@arc-fusion/pb-editor-wrapper
Advanced tools
Comparing version 0.0.355 to 0.0.356
@@ -59,2 +59,4 @@ "use strict"; | ||
function callback(mutationsList) { | ||
var observedFingerprints = []; | ||
var _iterator = _createForOfIteratorHelper(mutationsList), | ||
@@ -70,12 +72,18 @@ _step; | ||
if ((mutation === null || mutation === void 0 ? void 0 : mutation.type) === 'childList' && mutation !== null && mutation !== void 0 && (_mutation$addedNodes = mutation.addedNodes) !== null && _mutation$addedNodes !== void 0 && _mutation$addedNodes.length) { | ||
console.log('MUTATION', { | ||
mutation: mutation | ||
}); | ||
var _mutation$previousSib; | ||
if (isChain) { | ||
var selectedFingerprint = mutation === null || mutation === void 0 ? void 0 : (_mutation$previousSib = mutation.previousSibling) === null || _mutation$previousSib === void 0 ? void 0 : _mutation$previousSib.getAttribute('data-fusion-component'); | ||
console.log('FINGERPRINT', fingerprint); | ||
if (isChain || observedFingerprints.includes(selectedFingerprint)) { | ||
console.log('DISCONNECT'); | ||
observer.disconnect(); | ||
} else { | ||
console.log('ADD WRAPPER AGAIN'); | ||
addMouseEventsToSiblings(enterNode); | ||
observedFingerprints.push(selectedFingerprint); | ||
} | ||
} else { | ||
console.log('DISCONNECT'); | ||
observer.disconnect(); | ||
} | ||
@@ -82,0 +90,0 @@ } |
{ | ||
"name": "@arc-fusion/pb-editor-wrapper", | ||
"description": "PageBuilder Preview Wrapper", | ||
"version": "0.0.355", | ||
"version": "0.0.356", | ||
"module": "dist/index.js", | ||
@@ -6,0 +6,0 @@ "files": [ |
10998
166