@arc-fusion/pb-editor-wrapper
Advanced tools
Comparing version 0.0.336 to 0.0.337
@@ -12,4 +12,2 @@ "use strict"; | ||
var _reactDom = _interopRequireDefault(require("react-dom")); | ||
var _propTypes = _interopRequireDefault(require("prop-types")); | ||
@@ -31,3 +29,2 @@ | ||
var enterRef = (0, _react.useRef)(); | ||
var suspended = (0, _react.useContext)(_react.SuspendedContext); | ||
var previewEvents = { | ||
@@ -62,17 +59,13 @@ generateHover: function generateHover(component) { | ||
(0, _react.useLayoutEffect)(function () { | ||
if (!suspended) { | ||
if (isChain) return; | ||
(0, _react.useEffect)(function () { | ||
if (isChain) return; | ||
var enterNode = document.querySelector("[data-fusion-component=\"".concat(fingerprint, "\"]")); | ||
var siblingNodes = (0, _getSiblingNodes.getSiblingNodes)(fingerprint, enterNode); | ||
console.log('hello world 2', enterNode, siblingNodes); | ||
addMouseEvents(siblingNodes); | ||
return function () { | ||
removeMouseEvents(siblingNodes); | ||
}; | ||
}); | ||
var enterNode = _reactDom.default.findDOMNode(enterRef.current); | ||
var siblingNodes = (0, _getSiblingNodes.getSiblingNodes)(fingerprint, enterNode); | ||
console.log('hello world 2', enterNode, siblingNodes); | ||
addMouseEvents(siblingNodes); | ||
return function () { | ||
removeMouseEvents(siblingNodes); | ||
}; | ||
} | ||
}, [suspended]); | ||
function addMouseEvents(siblingNodes) { | ||
@@ -79,0 +72,0 @@ siblingNodes.forEach(function (element) { |
{ | ||
"name": "@arc-fusion/pb-editor-wrapper", | ||
"description": "PageBuilder Preview Wrapper", | ||
"version": "0.0.336", | ||
"version": "0.0.337", | ||
"module": "dist/index.js", | ||
@@ -6,0 +6,0 @@ "files": [ |
7288
115