mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
Change SizeSelect.images back to const: no reactivity needed here
This commit is contained in:
parent
1eb84b5d64
commit
e003a08c83
2 changed files with 2 additions and 6 deletions
|
@ -174,7 +174,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|||
let sizeSelect: any;
|
||||
let active = false;
|
||||
|
||||
$: if (activeImage && sizeSelect?.images?.includes(activeImage)) {
|
||||
$: if (activeImage && sizeSelect?.images.includes(activeImage)) {
|
||||
updateSizes();
|
||||
} else {
|
||||
resetSizes();
|
||||
|
|
|
@ -62,7 +62,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|||
return createPathRecursive([], element).join(" > ");
|
||||
}
|
||||
|
||||
export let images: HTMLImageElement[] = [];
|
||||
export const images: HTMLImageElement[] = [];
|
||||
|
||||
$: for (const [index, image] of images.entries()) {
|
||||
const rule = sheet.cssRules[index] as CSSStyleRule;
|
||||
|
@ -136,8 +136,6 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|||
);
|
||||
const rule = sheet.cssRules[index] as CSSStyleRule;
|
||||
setImageRule(image, rule);
|
||||
|
||||
images = images;
|
||||
}
|
||||
|
||||
function addImageOnLoad(image: HTMLImageElement): void {
|
||||
|
@ -176,8 +174,6 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|||
for (const image of removedImages) {
|
||||
removeImage(image);
|
||||
}
|
||||
|
||||
images = images;
|
||||
});
|
||||
|
||||
$: if (container) {
|
||||
|
|
Loading…
Reference in a new issue