publ-echo-test 0.0.76 → 0.0.78
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.
@@ -171,7 +171,17 @@ var GridItem = function (_a) {
|
|
171
171
|
* @return {Element} Child wrapped in Draggable.
|
172
172
|
*/
|
173
173
|
var mixinDraggable = function (child, isDraggable) {
|
174
|
-
|
174
|
+
function onMouseDownDraggable() {
|
175
|
+
var _a, _b;
|
176
|
+
console.log('mouse down!');
|
177
|
+
if (!isDraggable) {
|
178
|
+
console.log('not draggable');
|
179
|
+
if ((_a = elementRef.current) === null || _a === void 0 ? void 0 : _a.classList) {
|
180
|
+
(_b = elementRef.current) === null || _b === void 0 ? void 0 : _b.classList.add('pointer-events-none');
|
181
|
+
}
|
182
|
+
}
|
183
|
+
}
|
184
|
+
return (_jsx(DraggableCore, { disabled: !isDraggable, onMouseDown: onMouseDownDraggable, onStart: onDragStart, onDrag: onDrag, onStop: onDragStop, handle: handle, cancel: ".react-resizable-handle" + (cancel ? "," + cancel : ""), scale: transformScale, nodeRef: elementRef, children: child }));
|
175
185
|
};
|
176
186
|
/**
|
177
187
|
* Mix a Resizable instance into a child.
|
@@ -207,12 +217,6 @@ var GridItem = function (_a) {
|
|
207
217
|
*/
|
208
218
|
var onDragStart = function (e, _a) {
|
209
219
|
var node = _a.node, deltaX = _a.deltaX, deltaY = _a.deltaY;
|
210
|
-
if (className === null || className === void 0 ? void 0 : className.split(" ").includes("bulk-child-item")) {
|
211
|
-
if (elementRef.current) {
|
212
|
-
elementRef.current.style.pointerEvents = 'none';
|
213
|
-
}
|
214
|
-
return;
|
215
|
-
}
|
216
220
|
var newPosition = { top: 0, left: 0 };
|
217
221
|
var offsetParent = node.offsetParent;
|
218
222
|
if (!offsetParent)
|