Change info, obwohl nichts geändert
This commit is contained in:
@@ -1 +1 @@
|
|||||||
1.2.29
|
1.2.30
|
||||||
@@ -238,6 +238,18 @@ export function initEditor() {
|
|||||||
if (!editor || typeof editor.on !== 'function') return () => {};
|
if (!editor || typeof editor.on !== 'function') return () => {};
|
||||||
let selectionJustChanged = false;
|
let selectionJustChanged = false;
|
||||||
let selectionTimer = null;
|
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 = () => {
|
const onSelect = () => {
|
||||||
selectionJustChanged = true;
|
selectionJustChanged = true;
|
||||||
if (selectionTimer) clearTimeout(selectionTimer);
|
if (selectionTimer) clearTimeout(selectionTimer);
|
||||||
@@ -251,6 +263,7 @@ export function initEditor() {
|
|||||||
markDirty();
|
markDirty();
|
||||||
};
|
};
|
||||||
const onComponentUpdate = (model) => {
|
const onComponentUpdate = (model) => {
|
||||||
|
if (isLibRef(model)) return;
|
||||||
const changed = (model && typeof model.changedAttributes === 'function')
|
const changed = (model && typeof model.changedAttributes === 'function')
|
||||||
? model.changedAttributes()
|
? model.changedAttributes()
|
||||||
: (model && model.changed) ? model.changed : null;
|
: (model && model.changed) ? model.changed : null;
|
||||||
|
|||||||
Reference in New Issue
Block a user