lido-player 0.0.2-alpha-99 → 0.0.2-beta-00
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.
- package/dist/cjs/{decode-Bw2Aqe6S.js → decode-DweIsOMk.js} +1 -1
- package/dist/cjs/{index-Cmk1eaCV.js → index-BLk7DH9M.js} +11 -8
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/lido-avatar_22.cjs.entry.js +20 -5
- package/dist/collection/components/container/lido-container.js +4 -2
- package/dist/collection/components/trace/lido-trace.js +14 -1
- package/dist/collection/utils/utils.js +4 -1
- package/dist/collection/utils/utilsHandlers/dragDropHandler.js +7 -7
- package/dist/components/index.js +1 -1
- package/dist/components/lido-container.js +1 -1
- package/dist/components/lido-home.js +1 -1
- package/dist/components/lido-root.js +1 -1
- package/dist/components/lido-trace.js +1 -1
- package/dist/components/{p-DdjiT37N.js → p-CTJcKeEK.js} +1 -1
- package/dist/components/p-CtU7FitD.js +1 -0
- package/dist/components/p-Cvme8ibO.js +1 -0
- package/dist/esm/{decode-BqPxsId-.js → decode-C_JRsKjk.js} +1 -1
- package/dist/esm/{index-BNZwxVWj.js → index-qr00vrOg.js} +11 -8
- package/dist/esm/index.js +1 -1
- package/dist/esm/lido-avatar_22.entry.js +20 -5
- package/dist/lido-player/index.esm.js +1 -1
- package/dist/lido-player/lido-player.esm.js +1 -1
- package/dist/lido-player/p-CmFYpNuR.js +1 -0
- package/dist/lido-player/{p-BFlGDCI4.js → p-DsjGEy2a.js} +1 -1
- package/dist/lido-player/{p-b28417ad.entry.js → p-b5b16f42.entry.js} +1 -1
- package/dist/types/utils/constants.d.ts +3 -1
- package/package.json +1 -1
- package/dist/components/p-BToRx4je.js +0 -1
- package/dist/components/p-D2I4rurf.js +0 -1
- package/dist/lido-player/p-CXTdf__z.js +0 -1
|
@@ -401,6 +401,7 @@ function enableDraggingWithScaling(element) {
|
|
|
401
401
|
duplicateElement.style.transform = computedStyle.transform;
|
|
402
402
|
duplicateElement.style.position = 'absolute';
|
|
403
403
|
duplicateElement.style.zIndex = '0';
|
|
404
|
+
duplicateElement.style.pointerEvents = "";
|
|
404
405
|
element.style.zIndex = '100';
|
|
405
406
|
document.body.appendChild(duplicateElement);
|
|
406
407
|
}
|
|
@@ -1083,10 +1084,11 @@ async function onClickDropOrDragElement(element, type) {
|
|
|
1083
1084
|
element.ariaPressed = 'true';
|
|
1084
1085
|
const selectedDropElement = type === 'drop' ? element : document.querySelector("[type='drop'].highlight-element");
|
|
1085
1086
|
const selectedDragElement = type === 'drag' ? element : document.querySelector("[type='drag'].highlight-element");
|
|
1087
|
+
setTimeout(() => {
|
|
1088
|
+
element.style.pointerEvents = "";
|
|
1089
|
+
}, 1000);
|
|
1086
1090
|
if (!selectedDropElement || element.classList.contains("dropped")) {
|
|
1087
|
-
console.log("hello");
|
|
1088
1091
|
onClickDragElement(element);
|
|
1089
|
-
element.style.pointerEvents = ""; // Re-enable pointer events if it was a drag element
|
|
1090
1092
|
return;
|
|
1091
1093
|
}
|
|
1092
1094
|
if (element.classList.contains("drop-element"))
|
|
@@ -1094,7 +1096,6 @@ async function onClickDropOrDragElement(element, type) {
|
|
|
1094
1096
|
if (selectedDropElement && selectedDragElement) {
|
|
1095
1097
|
selectedDropElement.style.pointerEvents = 'none'; // Disable pointer events on drop element during animation
|
|
1096
1098
|
selectedDragElement.style.pointerEvents = 'none'; // Disable pointer events on drag element during animation
|
|
1097
|
-
console.log("drop called!!!");
|
|
1098
1099
|
if (selectedDragElement.getAttribute('drop-to'))
|
|
1099
1100
|
return;
|
|
1100
1101
|
// Add a transition for a smooth, slower movement
|
|
@@ -1121,13 +1122,12 @@ async function onClickDropOrDragElement(element, type) {
|
|
|
1121
1122
|
}
|
|
1122
1123
|
// await new Promise(resolve => setTimeout(resolve, 500));
|
|
1123
1124
|
await onElementDropComplete(selectedDragElement, selectedDropElement);
|
|
1124
|
-
|
|
1125
|
+
if (container.getAttribute("drop-action") !== exports.DropAction.InfiniteDrop && container.getAttribute("drop-action") !== exports.DropAction.Move) {
|
|
1126
|
+
selectedDragElement.style.pointerEvents = '';
|
|
1127
|
+
}
|
|
1125
1128
|
selectedDropElement.style.pointerEvents = ''; // Re-enable pointer events on drop element after animation
|
|
1126
1129
|
// ensure count update for click-to-drop flow
|
|
1127
1130
|
await executeActions("this.updateCountBlender='true'", container);
|
|
1128
|
-
// await new Promise(resolve => setTimeout(resolve, 500));
|
|
1129
|
-
// selectedDragElement.style.transform = 'translate(0px, 0px)';
|
|
1130
|
-
// selectedDropElement.style.pointerEvents = '';
|
|
1131
1131
|
}
|
|
1132
1132
|
}
|
|
1133
1133
|
const dragToDropMap = new Map();
|
|
@@ -72564,6 +72564,9 @@ const afterDropDragHandling = (dragElement, dropElement) => {
|
|
|
72564
72564
|
dragElement.style.width = dropElement.style.width;
|
|
72565
72565
|
dragElement.style.height = dropElement.style.height;
|
|
72566
72566
|
dragElement.setAttribute('hasDummy', 'true');
|
|
72567
|
+
setTimeout(() => {
|
|
72568
|
+
dummyElement.style.pointerEvents = "";
|
|
72569
|
+
}, 1000);
|
|
72567
72570
|
}
|
|
72568
72571
|
dummyElement.setAttribute('id', dragElement.getAttribute('id'));
|
|
72569
72572
|
dragElement.replaceWith(dummyElement);
|
|
@@ -73646,7 +73649,7 @@ function placeElementInDropZone(dropElement, dragElement, orientation, dropAttr)
|
|
|
73646
73649
|
const scale = typeof calculateScale === "function" ? calculateScale() : 1;
|
|
73647
73650
|
if (!dropElement.dataset.dropCount)
|
|
73648
73651
|
dropElement.dataset.dropCount = "0";
|
|
73649
|
-
let dropCount = parseInt(dropElement.
|
|
73652
|
+
let dropCount = parseInt(dropElement.childElementCount) - 1;
|
|
73650
73653
|
// === READ DROP ZONE SIZE ===
|
|
73651
73654
|
const dropWidth = dropRect.width;
|
|
73652
73655
|
const dropHeight = dropRect.height;
|
package/dist/cjs/index.cjs.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var index = require('./index-Bsk4M2Qz.js');
|
|
4
|
-
var index$1 = require('./index-
|
|
4
|
+
var index$1 = require('./index-BLk7DH9M.js');
|
|
5
5
|
|
|
6
6
|
var rive$1 = {exports: {}};
|
|
7
7
|
|
|
@@ -12177,7 +12177,9 @@ const LidoContainer = class {
|
|
|
12177
12177
|
"palegmamultioption": "palegmamultioptionAudio" /* templateAudio.palegmamultioption */,
|
|
12178
12178
|
"palegraoptionaudio": "palegraoptionAudio" /* templateAudio.palegraoptionaudio */,
|
|
12179
12179
|
"palegrawordmatch": "palegrawordmatchAudio" /* templateAudio.palegrawordmatch */,
|
|
12180
|
-
"palegramcqimages": "palegramcqimagesAudio" /* templateAudio.palegramcqimages
|
|
12180
|
+
"palegramcqimages": "palegramcqimagesAudio" /* templateAudio.palegramcqimages */,
|
|
12181
|
+
"drawShape": "drawshape" /* templateAudio.drawShape */,
|
|
12182
|
+
"drawshape": "drawshape" /* templateAudio.drawshape */,
|
|
12181
12183
|
}[this.templateId]) !== null && _a !== void 0 ? _a : '';
|
|
12182
12184
|
const home = document.querySelector('lido-home');
|
|
12183
12185
|
if (!home)
|
|
@@ -12334,7 +12336,7 @@ const LidoContainer = class {
|
|
|
12334
12336
|
userSelect: 'none', // Prevent any field selection
|
|
12335
12337
|
};
|
|
12336
12338
|
console.log('🚀 ~ LidoContainer ~ canplay:', this.canplay);
|
|
12337
|
-
return (index.h(index.Host, { key: '
|
|
12339
|
+
return (index.h(index.Host, { key: '00435f1640abcc2d786ab2987e5bcda22816b987', id: "lido-container", Lang: this.Lang, "tab-index": 0, class: "lido-container", objective: this.objective, baseUrl: this.baseUrl, style: style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, onTouch: this.onTouch, onInCorrect: this.onInCorrect, onCorrect: this.onCorrect, onEntry: this.onEntry, "show-check": `${this.showCheck}`, "is-continue-on-correct": `${this.isContinueOnCorrect}`, "is-allow-only-correct": `${this.isAllowOnlyCorrect}`, canplay: `${this.canplay}`, appendToDropOnCompletion: `${this.appendToDropOnCompletion}`, "show-prev-button": `${this.showPrevButton}`, "show-next-button": `${this.showNextButton}`, "show-drop-border": `${this.showDropBorder}`, "bg-image": this.bgImage, "exit-button-url": this.exitButtonUrl, "prev-button-url": this.prevButtonUrl, "next-button-url": this.nextButtonUrl, "speaker-button-url": this.speakerButtonUrl, "disable-speak": `${this.disableSpeak}`, "template-id": this.templateId, audio: this.audio, "highlight-word-by-word": `${this.highlightWordByWord}` }, index.h("lido-text", { key: '9a680e74b6595888174b8ad7a13cc54943292020', visible: "false", id: this.templateId, audio: "", string: this.instructName }), index.h("slot", { key: '5832050a7c60b9fca20544619b3ebc9f56c3ef67' })));
|
|
12338
12340
|
}
|
|
12339
12341
|
get el() { return index.getElement(this); }
|
|
12340
12342
|
static get watchers() { return {
|
|
@@ -12874,7 +12876,7 @@ const LidoHome = class {
|
|
|
12874
12876
|
}
|
|
12875
12877
|
// Pure-JS fallback (no wasm asset required)
|
|
12876
12878
|
try {
|
|
12877
|
-
const brotliDecodeModule = await Promise.resolve().then(function () { return require('./decode-
|
|
12879
|
+
const brotliDecodeModule = await Promise.resolve().then(function () { return require('./decode-DweIsOMk.js'); }).then(function (n) { return n.decode; });
|
|
12878
12880
|
const brotliDecompressBuffer = brotliDecodeModule.BrotliDecompressBuffer || ((_a = brotliDecodeModule.default) === null || _a === void 0 ? void 0 : _a.BrotliDecompressBuffer);
|
|
12879
12881
|
if (typeof brotliDecompressBuffer !== 'function') {
|
|
12880
12882
|
throw new Error('BrotliDecompressBuffer function not found in brotli/dec/decode');
|
|
@@ -18015,6 +18017,7 @@ const LidoTrace = class {
|
|
|
18015
18017
|
freeTraceLines: [],
|
|
18016
18018
|
currentFreePath: [],
|
|
18017
18019
|
lastPointerPos: null,
|
|
18020
|
+
isCompletingPath: false,
|
|
18018
18021
|
};
|
|
18019
18022
|
const url = this.svgUrls[this.currentSvgIndex];
|
|
18020
18023
|
console.log('Loading SVG from URL:', url);
|
|
@@ -18349,6 +18352,8 @@ const LidoTrace = class {
|
|
|
18349
18352
|
return;
|
|
18350
18353
|
if (!state.circle || !state.paths || state.paths.length === 0)
|
|
18351
18354
|
return;
|
|
18355
|
+
if (state.isCompletingPath)
|
|
18356
|
+
return;
|
|
18352
18357
|
this.hideFingerHint(); // user is active, remove hint
|
|
18353
18358
|
const evt = state.pointerMoveEvent;
|
|
18354
18359
|
const pointerPos = this.getPointerPosition(evt, state.svg);
|
|
@@ -18520,6 +18525,9 @@ const LidoTrace = class {
|
|
|
18520
18525
|
let pathIsClosed = this.getDistanceSquared(startPoint, endPoint) < 200; // threshold for overlap
|
|
18521
18526
|
if (pathIsClosed && state.totalPathLength > 50) {
|
|
18522
18527
|
if (percentComplete >= COMPLETION_THRESHOLD) {
|
|
18528
|
+
if (state.isCompletingPath)
|
|
18529
|
+
return;
|
|
18530
|
+
state.isCompletingPath = true;
|
|
18523
18531
|
// Animate the draggable circle & green trace to the very end, then proceed
|
|
18524
18532
|
await this.animatePathToEnd(state, currentPath);
|
|
18525
18533
|
if (state.currentPathIndex < state.paths.length - 1) {
|
|
@@ -18533,9 +18541,15 @@ const LidoTrace = class {
|
|
|
18533
18541
|
else {
|
|
18534
18542
|
// For open paths, allow completion if near the end
|
|
18535
18543
|
if (state.totalPathLength - 1 - state.lastLength < 5 && state.currentPathIndex < state.paths.length - 1) {
|
|
18544
|
+
if (state.isCompletingPath)
|
|
18545
|
+
return;
|
|
18546
|
+
state.isCompletingPath = true;
|
|
18536
18547
|
this.moveToNextPath(state);
|
|
18537
18548
|
}
|
|
18538
18549
|
else if (state.totalPathLength - 1 - state.lastLength < 5 && state.currentPathIndex === state.paths.length - 1) {
|
|
18550
|
+
if (state.isCompletingPath)
|
|
18551
|
+
return;
|
|
18552
|
+
state.isCompletingPath = true;
|
|
18539
18553
|
this.moveToNextContainer();
|
|
18540
18554
|
}
|
|
18541
18555
|
}
|
|
@@ -18729,6 +18743,7 @@ const LidoTrace = class {
|
|
|
18729
18743
|
state.isDragging = false;
|
|
18730
18744
|
state.currentPathIndex++;
|
|
18731
18745
|
state.lastLength = 0;
|
|
18746
|
+
state.isCompletingPath = false;
|
|
18732
18747
|
this.hideFingerHint(); // remove hint when changing path
|
|
18733
18748
|
if (state.currentPathIndex >= state.paths.length) {
|
|
18734
18749
|
this.moveToNextContainer();
|
|
@@ -18839,7 +18854,7 @@ const LidoTrace = class {
|
|
|
18839
18854
|
};
|
|
18840
18855
|
}
|
|
18841
18856
|
render() {
|
|
18842
|
-
return (index.h(index.Host, { key: '
|
|
18857
|
+
return (index.h(index.Host, { key: '47a5947638a6a6c84cd294d6b3d8062a36553fc1', class: "lido-trace", id: this.id, audio: this.audio, onCorrect: this.onCorrect, onInCorrect: this.onInCorrect, style: this.style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, tabindex: this.tabIndex, "disable-speak": this.disableSpeak }, index.h("div", { key: '13e10f42f4747405ebe8c9ef5826f386a1e894e9', style: this.style, id: "lido-svgContainer" })));
|
|
18843
18858
|
}
|
|
18844
18859
|
static get assetsDirs() { return ["svg", "images"]; }
|
|
18845
18860
|
get el() { return index.getElement(this); }
|
|
@@ -288,7 +288,9 @@ export class LidoContainer {
|
|
|
288
288
|
"palegmamultioption": "palegmamultioptionAudio" /* templateAudio.palegmamultioption */,
|
|
289
289
|
"palegraoptionaudio": "palegraoptionAudio" /* templateAudio.palegraoptionaudio */,
|
|
290
290
|
"palegrawordmatch": "palegrawordmatchAudio" /* templateAudio.palegrawordmatch */,
|
|
291
|
-
"palegramcqimages": "palegramcqimagesAudio" /* templateAudio.palegramcqimages
|
|
291
|
+
"palegramcqimages": "palegramcqimagesAudio" /* templateAudio.palegramcqimages */,
|
|
292
|
+
"drawShape": "drawshape" /* templateAudio.drawShape */,
|
|
293
|
+
"drawshape": "drawshape" /* templateAudio.drawshape */,
|
|
292
294
|
}[this.templateId]) !== null && _a !== void 0 ? _a : '';
|
|
293
295
|
const home = document.querySelector('lido-home');
|
|
294
296
|
if (!home)
|
|
@@ -445,7 +447,7 @@ export class LidoContainer {
|
|
|
445
447
|
userSelect: 'none', // Prevent any field selection
|
|
446
448
|
};
|
|
447
449
|
console.log('🚀 ~ LidoContainer ~ canplay:', this.canplay);
|
|
448
|
-
return (h(Host, { key: '
|
|
450
|
+
return (h(Host, { key: '00435f1640abcc2d786ab2987e5bcda22816b987', id: "lido-container", Lang: this.Lang, "tab-index": 0, class: "lido-container", objective: this.objective, baseUrl: this.baseUrl, style: style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, onTouch: this.onTouch, onInCorrect: this.onInCorrect, onCorrect: this.onCorrect, onEntry: this.onEntry, "show-check": `${this.showCheck}`, "is-continue-on-correct": `${this.isContinueOnCorrect}`, "is-allow-only-correct": `${this.isAllowOnlyCorrect}`, canplay: `${this.canplay}`, appendToDropOnCompletion: `${this.appendToDropOnCompletion}`, "show-prev-button": `${this.showPrevButton}`, "show-next-button": `${this.showNextButton}`, "show-drop-border": `${this.showDropBorder}`, "bg-image": this.bgImage, "exit-button-url": this.exitButtonUrl, "prev-button-url": this.prevButtonUrl, "next-button-url": this.nextButtonUrl, "speaker-button-url": this.speakerButtonUrl, "disable-speak": `${this.disableSpeak}`, "template-id": this.templateId, audio: this.audio, "highlight-word-by-word": `${this.highlightWordByWord}` }, h("lido-text", { key: '9a680e74b6595888174b8ad7a13cc54943292020', visible: "false", id: this.templateId, audio: "", string: this.instructName }), h("slot", { key: '5832050a7c60b9fca20544619b3ebc9f56c3ef67' })));
|
|
449
451
|
}
|
|
450
452
|
static get is() { return "lido-container"; }
|
|
451
453
|
static get originalStyleUrls() {
|
|
@@ -140,6 +140,7 @@ export class LidoTrace {
|
|
|
140
140
|
freeTraceLines: [],
|
|
141
141
|
currentFreePath: [],
|
|
142
142
|
lastPointerPos: null,
|
|
143
|
+
isCompletingPath: false,
|
|
143
144
|
};
|
|
144
145
|
const url = this.svgUrls[this.currentSvgIndex];
|
|
145
146
|
console.log('Loading SVG from URL:', url);
|
|
@@ -474,6 +475,8 @@ export class LidoTrace {
|
|
|
474
475
|
return;
|
|
475
476
|
if (!state.circle || !state.paths || state.paths.length === 0)
|
|
476
477
|
return;
|
|
478
|
+
if (state.isCompletingPath)
|
|
479
|
+
return;
|
|
477
480
|
this.hideFingerHint(); // user is active, remove hint
|
|
478
481
|
const evt = state.pointerMoveEvent;
|
|
479
482
|
const pointerPos = this.getPointerPosition(evt, state.svg);
|
|
@@ -645,6 +648,9 @@ export class LidoTrace {
|
|
|
645
648
|
let pathIsClosed = this.getDistanceSquared(startPoint, endPoint) < 200; // threshold for overlap
|
|
646
649
|
if (pathIsClosed && state.totalPathLength > 50) {
|
|
647
650
|
if (percentComplete >= COMPLETION_THRESHOLD) {
|
|
651
|
+
if (state.isCompletingPath)
|
|
652
|
+
return;
|
|
653
|
+
state.isCompletingPath = true;
|
|
648
654
|
// Animate the draggable circle & green trace to the very end, then proceed
|
|
649
655
|
await this.animatePathToEnd(state, currentPath);
|
|
650
656
|
if (state.currentPathIndex < state.paths.length - 1) {
|
|
@@ -658,9 +664,15 @@ export class LidoTrace {
|
|
|
658
664
|
else {
|
|
659
665
|
// For open paths, allow completion if near the end
|
|
660
666
|
if (state.totalPathLength - 1 - state.lastLength < 5 && state.currentPathIndex < state.paths.length - 1) {
|
|
667
|
+
if (state.isCompletingPath)
|
|
668
|
+
return;
|
|
669
|
+
state.isCompletingPath = true;
|
|
661
670
|
this.moveToNextPath(state);
|
|
662
671
|
}
|
|
663
672
|
else if (state.totalPathLength - 1 - state.lastLength < 5 && state.currentPathIndex === state.paths.length - 1) {
|
|
673
|
+
if (state.isCompletingPath)
|
|
674
|
+
return;
|
|
675
|
+
state.isCompletingPath = true;
|
|
664
676
|
this.moveToNextContainer();
|
|
665
677
|
}
|
|
666
678
|
}
|
|
@@ -854,6 +866,7 @@ export class LidoTrace {
|
|
|
854
866
|
state.isDragging = false;
|
|
855
867
|
state.currentPathIndex++;
|
|
856
868
|
state.lastLength = 0;
|
|
869
|
+
state.isCompletingPath = false;
|
|
857
870
|
this.hideFingerHint(); // remove hint when changing path
|
|
858
871
|
if (state.currentPathIndex >= state.paths.length) {
|
|
859
872
|
this.moveToNextContainer();
|
|
@@ -964,7 +977,7 @@ export class LidoTrace {
|
|
|
964
977
|
};
|
|
965
978
|
}
|
|
966
979
|
render() {
|
|
967
|
-
return (h(Host, { key: '
|
|
980
|
+
return (h(Host, { key: '47a5947638a6a6c84cd294d6b3d8062a36553fc1', class: "lido-trace", id: this.id, audio: this.audio, onCorrect: this.onCorrect, onInCorrect: this.onInCorrect, style: this.style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, tabindex: this.tabIndex, "disable-speak": this.disableSpeak }, h("div", { key: '13e10f42f4747405ebe8c9ef5826f386a1e894e9', style: this.style, id: "lido-svgContainer" })));
|
|
968
981
|
}
|
|
969
982
|
static get is() { return "lido-trace"; }
|
|
970
983
|
static get originalStyleUrls() {
|
|
@@ -395,6 +395,9 @@ const afterDropDragHandling = (dragElement, dropElement) => {
|
|
|
395
395
|
dragElement.style.width = dropElement.style.width;
|
|
396
396
|
dragElement.style.height = dropElement.style.height;
|
|
397
397
|
dragElement.setAttribute('hasDummy', 'true');
|
|
398
|
+
setTimeout(() => {
|
|
399
|
+
dummyElement.style.pointerEvents = "";
|
|
400
|
+
}, 1000);
|
|
398
401
|
}
|
|
399
402
|
dummyElement.setAttribute('id', dragElement.getAttribute('id'));
|
|
400
403
|
dragElement.replaceWith(dummyElement);
|
|
@@ -1479,7 +1482,7 @@ function placeElementInDropZone(dropElement, dragElement, orientation, dropAttr)
|
|
|
1479
1482
|
const scale = typeof calculateScale === "function" ? calculateScale() : 1;
|
|
1480
1483
|
if (!dropElement.dataset.dropCount)
|
|
1481
1484
|
dropElement.dataset.dropCount = "0";
|
|
1482
|
-
let dropCount = parseInt(dropElement.
|
|
1485
|
+
let dropCount = parseInt(dropElement.childElementCount) - 1;
|
|
1483
1486
|
// === READ DROP ZONE SIZE ===
|
|
1484
1487
|
const dropWidth = dropRect.width;
|
|
1485
1488
|
const dropHeight = dropRect.height;
|
|
@@ -129,6 +129,7 @@ export function enableDraggingWithScaling(element) {
|
|
|
129
129
|
duplicateElement.style.transform = computedStyle.transform;
|
|
130
130
|
duplicateElement.style.position = 'absolute';
|
|
131
131
|
duplicateElement.style.zIndex = '0';
|
|
132
|
+
duplicateElement.style.pointerEvents = "";
|
|
132
133
|
element.style.zIndex = '100';
|
|
133
134
|
document.body.appendChild(duplicateElement);
|
|
134
135
|
}
|
|
@@ -819,10 +820,11 @@ export async function onClickDropOrDragElement(element, type) {
|
|
|
819
820
|
element.ariaPressed = 'true';
|
|
820
821
|
const selectedDropElement = type === 'drop' ? element : document.querySelector("[type='drop'].highlight-element");
|
|
821
822
|
const selectedDragElement = type === 'drag' ? element : document.querySelector("[type='drag'].highlight-element");
|
|
823
|
+
setTimeout(() => {
|
|
824
|
+
element.style.pointerEvents = "";
|
|
825
|
+
}, 1000);
|
|
822
826
|
if (!selectedDropElement || element.classList.contains("dropped")) {
|
|
823
|
-
console.log("hello");
|
|
824
827
|
onClickDragElement(element);
|
|
825
|
-
element.style.pointerEvents = ""; // Re-enable pointer events if it was a drag element
|
|
826
828
|
return;
|
|
827
829
|
}
|
|
828
830
|
if (element.classList.contains("drop-element"))
|
|
@@ -830,7 +832,6 @@ export async function onClickDropOrDragElement(element, type) {
|
|
|
830
832
|
if (selectedDropElement && selectedDragElement) {
|
|
831
833
|
selectedDropElement.style.pointerEvents = 'none'; // Disable pointer events on drop element during animation
|
|
832
834
|
selectedDragElement.style.pointerEvents = 'none'; // Disable pointer events on drag element during animation
|
|
833
|
-
console.log("drop called!!!");
|
|
834
835
|
if (selectedDragElement.getAttribute('drop-to'))
|
|
835
836
|
return;
|
|
836
837
|
// Add a transition for a smooth, slower movement
|
|
@@ -857,13 +858,12 @@ export async function onClickDropOrDragElement(element, type) {
|
|
|
857
858
|
}
|
|
858
859
|
// await new Promise(resolve => setTimeout(resolve, 500));
|
|
859
860
|
await onElementDropComplete(selectedDragElement, selectedDropElement);
|
|
860
|
-
|
|
861
|
+
if (container.getAttribute("drop-action") !== DropAction.InfiniteDrop && container.getAttribute("drop-action") !== DropAction.Move) {
|
|
862
|
+
selectedDragElement.style.pointerEvents = '';
|
|
863
|
+
}
|
|
861
864
|
selectedDropElement.style.pointerEvents = ''; // Re-enable pointer events on drop element after animation
|
|
862
865
|
// ensure count update for click-to-drop flow
|
|
863
866
|
await executeActions("this.updateCountBlender='true'", container);
|
|
864
|
-
// await new Promise(resolve => setTimeout(resolve, 500));
|
|
865
|
-
// selectedDragElement.style.transform = 'translate(0px, 0px)';
|
|
866
|
-
// selectedDropElement.style.pointerEvents = '';
|
|
867
867
|
}
|
|
868
868
|
}
|
|
869
869
|
export const dragToDropMap = new Map();
|