Detect active status again

This commit is contained in:
Henrik Giesel 2021-07-29 00:40:26 +02:00 committed by Damien Elmes
parent 69f1c353df
commit 13f5819f48

View file

@ -19,6 +19,15 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
export let activeImage: HTMLImageElement | null;
export let active: boolean = false;
$: {
const index = images.indexOf(activeImage!);
if (index >= 0) {
const rule = sheet.cssRules[index] as CSSStyleRule;
active = rule.cssText.endsWith("{ }");
}
}
export let isRtl: boolean;
export let maxWidth = 250;
export let maxHeight = 125;