Compare commits
2 Commits
20c8d2f763
...
5e33b072d6
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5e33b072d6 | ||
|
|
bcc445f75a |
@@ -1,4 +1,4 @@
|
|||||||
var content, preview;
|
var content, preview, selfPrinter;
|
||||||
var Printer = function () {
|
var Printer = function () {
|
||||||
|
|
||||||
|
|
||||||
@@ -9,7 +9,6 @@ var Printer = function () {
|
|||||||
|
|
||||||
content = this.content = document.querySelector('.js-content');
|
content = this.content = document.querySelector('.js-content');
|
||||||
|
|
||||||
|
|
||||||
selfPrinter = this;
|
selfPrinter = this;
|
||||||
this.reset.addEventListener('click', this.clear);
|
this.reset.addEventListener('click', this.clear);
|
||||||
|
|
||||||
@@ -23,14 +22,7 @@ var Printer = function () {
|
|||||||
|
|
||||||
document.querySelectorAll('.icon').forEach(function (e) {
|
document.querySelectorAll('.icon').forEach(function (e) {
|
||||||
e.addEventListener('click', function () {
|
e.addEventListener('click', function () {
|
||||||
|
|
||||||
selfPrinter.selectIcon(this.title);
|
selfPrinter.selectIcon(this.title);
|
||||||
|
|
||||||
// document.querySelectorAll('.icon').forEach(function (e, i) {
|
|
||||||
// e.classList.remove('selected');
|
|
||||||
// });
|
|
||||||
// document.querySelector('#icon').value = this.title;
|
|
||||||
// this.classList.add('selected');
|
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user