publ-echo-test 0.0.78 → 0.0.79
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -36,6 +36,7 @@ var GridItem = function (_a) {
|
|
36
36
|
var _o = useState(), dragStart = _o[0], setDragStart = _o[1];
|
37
37
|
var _p = useState(false), isDragging = _p[0], setIsDragging = _p[1];
|
38
38
|
var _q = useState(false), isResizing = _q[0], setIsResizing = _q[1];
|
39
|
+
var _r = useState(false), pointerEventsNone = _r[0], setPointerEventsNone = _r[1];
|
39
40
|
var elementRef = useRef(null);
|
40
41
|
var isSelected = (_b = elementRef.current) === null || _b === void 0 ? void 0 : _b.classList.contains('react-grid-item-selected');
|
41
42
|
useEffect(function () {
|
@@ -172,12 +173,11 @@ var GridItem = function (_a) {
|
|
172
173
|
*/
|
173
174
|
var mixinDraggable = function (child, isDraggable) {
|
174
175
|
function onMouseDownDraggable() {
|
175
|
-
var _a
|
176
|
-
console.log('mouse down!');
|
176
|
+
var _a;
|
177
177
|
if (!isDraggable) {
|
178
|
-
console.log('not draggable');
|
179
178
|
if ((_a = elementRef.current) === null || _a === void 0 ? void 0 : _a.classList) {
|
180
|
-
|
179
|
+
// elementRef.current?.classList.add('pointer-events-none')
|
180
|
+
setPointerEventsNone(true);
|
181
181
|
}
|
182
182
|
}
|
183
183
|
}
|
@@ -409,7 +409,7 @@ var GridItem = function (_a) {
|
|
409
409
|
// dropping: Boolean(droppingPosition),
|
410
410
|
cssTransforms: useCSSTransforms,
|
411
411
|
}),
|
412
|
-
style: __assign(__assign(__assign({}, props.style), child.props.style), createStyle(pos)),
|
412
|
+
style: __assign(__assign(__assign(__assign({}, props.style), child.props.style), createStyle(pos)), { pointerEvents: pointerEventsNone ? 'none' : 'auto' }),
|
413
413
|
});
|
414
414
|
newChild = mixinResizable(newChild, pos, isResizable);
|
415
415
|
newChild = mixinDraggable(newChild, isDraggable);
|