feature: vor und nachteile

This commit is contained in:
Hikyu
2026-05-31 13:54:31 +02:00
parent 552a947a1c
commit e3dad17446
23270 changed files with 3024794 additions and 200 deletions
@@ -0,0 +1,30 @@
import { useElementBounding } from '@vueuse/core'
import { inject, ref, watch } from 'vue'
import { injectionSlideElement } from '../constants'
import { editorHeight, editorWidth, isEditorVertical, showEditor, slideScale, windowSize } from '../state'
export function useSlideBounds(slideElement = inject(injectionSlideElement, ref())) {
const bounding = useElementBounding(slideElement)
const stop = watch(
[
showEditor,
isEditorVertical,
editorWidth,
editorHeight,
slideScale,
windowSize.width,
windowSize.height,
],
() => {
setTimeout(bounding.update, 300)
},
{
flush: 'post',
immediate: true,
},
)
return {
...bounding,
stop,
}
}