Skip to content

Commit ee24a6d

Browse files
committed
Fix bad merge with d.ts file
1 parent effe3bb commit ee24a6d

File tree

2 files changed

+17
-18
lines changed

2 files changed

+17
-18
lines changed

src/viewer/change-mask.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ class MaskManager {
3838
}
3939
}
4040

41+
/** @type {HTMLElement} */
42+
const container = document.querySelector('.icon__grid');
4143
/** @type {NodeListOf<HTMLElement>} All elements to change the mask of. */
4244
const masked = document.querySelectorAll('.masked');
4345
/** @type {NodeListOf<HTMLElement>} */
@@ -50,3 +52,18 @@ maskManager.container.addEventListener('change', (evt) => {
5052
applyMask(masked, icons, radio.value);
5153
}
5254
});
55+
document.querySelector('.controls').addEventListener('change', (evt) => {
56+
const checkbox = /** @type {HTMLInputElement} */ (evt.target);
57+
switch (checkbox.name) {
58+
case 'shrink': {
59+
// Shrink the icon to 1/4 size
60+
const size = checkbox.checked ? '0.25' : '1';
61+
container.style.transform = `scale(${size})`;
62+
break;
63+
}
64+
case 'ghost':
65+
// Show ghost image behind icon
66+
container.classList.toggle('icon--ghost', checkbox.checked);
67+
break;
68+
}
69+
});

src/viewer/upload-icon.js

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -123,21 +123,3 @@ if (demoLinks) {
123123
}
124124
});
125125
}
126-
127-
/** @type {HTMLElement} */
128-
const container = document.querySelector('.icon__grid');
129-
document.querySelector('.controls').addEventListener('change', (evt) => {
130-
const checkbox = /** @type {HTMLInputElement} */ (evt.target);
131-
switch (checkbox.name) {
132-
case 'shrink': {
133-
// Shrink the icon to 1/4 size
134-
const size = checkbox.checked ? '0.25' : '1';
135-
container.style.transform = `scale(${size})`;
136-
break;
137-
}
138-
case 'original':
139-
// Show ghost image behind icon
140-
container.classList.toggle('icon--original', checkbox.checked);
141-
break;
142-
}
143-
});

0 commit comments

Comments
 (0)