mirror of
https://github.com/ankitects/anki.git
synced 2025-09-20 15:02:21 -04:00
Detect active status again
This commit is contained in:
parent
69f1c353df
commit
13f5819f48
1 changed files with 9 additions and 0 deletions
|
@ -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 activeImage: HTMLImageElement | null;
|
||||||
export let active: boolean = false;
|
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 isRtl: boolean;
|
||||||
export let maxWidth = 250;
|
export let maxWidth = 250;
|
||||||
export let maxHeight = 125;
|
export let maxHeight = 125;
|
||||||
|
|
Loading…
Reference in a new issue