Change info, obwohl nichts geändert

This commit is contained in:
2026-02-03 03:54:15 +01:00
parent d10614dc0a
commit e282004786
2 changed files with 14 additions and 1 deletions

View File

@@ -1 +1 @@
1.2.29
1.2.30

View File

@@ -238,6 +238,18 @@ export function initEditor() {
if (!editor || typeof editor.on !== 'function') return () => {};
let selectionJustChanged = false;
let selectionTimer = null;
const isLibRef = (model) => {
if (!model) return false;
const attrs = typeof model.getAttributes === 'function'
? model.getAttributes()
: (model.attributes && model.attributes.attributes) ? model.attributes.attributes : {};
if (attrs && (attrs['data-lib-ref'] || attrs['data-lib-kind'] || attrs['data-lib-id'])) return true;
try {
const classes = typeof model.getClasses === 'function' ? model.getClasses() : [];
if (Array.isArray(classes) && classes.includes('lib-ref-wrapper')) return true;
} catch {}
return false;
};
const onSelect = () => {
selectionJustChanged = true;
if (selectionTimer) clearTimeout(selectionTimer);
@@ -251,6 +263,7 @@ export function initEditor() {
markDirty();
};
const onComponentUpdate = (model) => {
if (isLibRef(model)) return;
const changed = (model && typeof model.changedAttributes === 'function')
? model.changedAttributes()
: (model && model.changed) ? model.changed : null;