fix
This commit is contained in:
parent
6e18d753a6
commit
48dc6861ea
3 changed files with 32 additions and 29 deletions
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "calckey",
|
"name": "calckey",
|
||||||
"version": "12.119.0-calc.18-rc.1",
|
"version": "12.119.0-calc.18-rc.2",
|
||||||
"codename": "aqua",
|
"codename": "aqua",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|
|
@ -71,10 +71,12 @@ const el = ref<HTMLElement>();
|
||||||
const width = ref(0);
|
const width = ref(0);
|
||||||
const height = ref(0);
|
const height = ref(0);
|
||||||
const colors = ['#eb6f92', '#9ccfd8', '#f6c177', '#f6c177', '#f6c177'];
|
const colors = ['#eb6f92', '#9ccfd8', '#f6c177', '#f6c177', '#f6c177'];
|
||||||
|
const reducedQuery = window.matchMedia('(prefers-reduced-motion: reduce)');
|
||||||
let stop = false;
|
let stop = false;
|
||||||
let ro: ResizeObserver | undefined;
|
let ro: ResizeObserver | undefined;
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
if (!reducedQuery.matches) {
|
||||||
ro = new ResizeObserver((entries, observer) => {
|
ro = new ResizeObserver((entries, observer) => {
|
||||||
width.value = el.value?.offsetWidth + 64;
|
width.value = el.value?.offsetWidth + 64;
|
||||||
height.value = el.value?.offsetHeight + 64;
|
height.value = el.value?.offsetHeight + 64;
|
||||||
|
@ -103,6 +105,7 @@ onMounted(() => {
|
||||||
}, 500 + (Math.random() * 500));
|
}, 500 + (Math.random() * 500));
|
||||||
};
|
};
|
||||||
add();
|
add();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
onUnmounted(() => {
|
onUnmounted(() => {
|
||||||
|
|
|
@ -158,7 +158,7 @@ const props = withDefaults(defineProps<{
|
||||||
}
|
}
|
||||||
|
|
||||||
@media(prefers-reduced-motion) {
|
@media(prefers-reduced-motion) {
|
||||||
div[class^='mfm'], div[class*=' mfm'] {
|
span[class^='mfm'], div[class*=' mfm'] {
|
||||||
animation: none;
|
animation: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue