pagedJS reload preview : decrease timeout

This commit is contained in:
isUnknown 2025-12-04 15:55:52 +01:00
parent 07e5764ccd
commit 6a01909b38
3 changed files with 31 additions and 20 deletions

View file

@ -40,7 +40,7 @@ import { useStylesheetStore } from '../stores/stylesheet';
const stylesheetStore = useStylesheetStore();
const props = defineProps({
iframeRef: Object
iframeRef: Object,
});
const visible = ref(false);
@ -48,9 +48,7 @@ const position = ref({ x: 0, y: 0 });
const selector = ref('');
const getSelectorFromElement = (element) => {
return element.id
? `#${element.id}`
: `.${element.className.split(' ')[0]}`;
return element.id ? `#${element.id}` : `.${element.className.split(' ')[0]}`;
};
const calculatePosition = (element) => {
@ -115,7 +113,7 @@ const handleCssInput = (event) => {
cssDebounceTimer = setTimeout(() => {
const oldBlock = elementCss.value;
stylesheetStore.content = stylesheetStore.content.replace(oldBlock, newCss);
}, 1000);
}, 500);
};
defineExpose({ handleIframeClick });