@hkdigital/lib-core 0.4.82 → 0.4.83
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.
|
@@ -133,6 +133,7 @@
|
|
|
133
133
|
isDragPreview = currentState === DRAG_PREVIEW;
|
|
134
134
|
});
|
|
135
135
|
|
|
136
|
+
|
|
136
137
|
// Clean up on component destroy
|
|
137
138
|
onDestroy(() => {
|
|
138
139
|
if (showPreview) {
|
|
@@ -160,11 +161,21 @@
|
|
|
160
161
|
* @param {DragEvent} event
|
|
161
162
|
*/
|
|
162
163
|
function handleDragStart(event) {
|
|
164
|
+
console.debug('handleDragStart called', {
|
|
165
|
+
target: event.target,
|
|
166
|
+
currentTarget: event.currentTarget,
|
|
167
|
+
disabled,
|
|
168
|
+
canDrag: canDrag(item),
|
|
169
|
+
dataTransfer: !!event.dataTransfer
|
|
170
|
+
});
|
|
171
|
+
|
|
163
172
|
if (disabled || !canDrag(item)) {
|
|
173
|
+
console.debug('Drag prevented: disabled or cannot drag');
|
|
164
174
|
event.preventDefault();
|
|
165
175
|
return;
|
|
166
176
|
}
|
|
167
177
|
|
|
178
|
+
|
|
168
179
|
// Handle drag delay
|
|
169
180
|
if (dragDelay > 0) {
|
|
170
181
|
event.preventDefault();
|
|
@@ -177,6 +188,7 @@
|
|
|
177
188
|
return;
|
|
178
189
|
}
|
|
179
190
|
|
|
191
|
+
console.debug('Starting drag operation');
|
|
180
192
|
currentState = DRAGGING;
|
|
181
193
|
startDrag(event);
|
|
182
194
|
}
|
|
@@ -515,5 +527,30 @@
|
|
|
515
527
|
-webkit-touch-callout: none;
|
|
516
528
|
-webkit-user-select: none;
|
|
517
529
|
user-select: none;
|
|
530
|
+
|
|
531
|
+
pointer-events: auto;
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
/* Prevent ALL child elements from interfering with drag */
|
|
535
|
+
[data-component='draggable'] :global(*) {
|
|
536
|
+
-webkit-user-drag: none !important;
|
|
537
|
+
-moz-user-select: none !important;
|
|
538
|
+
-webkit-user-select: none !important;
|
|
539
|
+
user-select: none !important;
|
|
540
|
+
/* Override any pointer-events: auto that child components might have */
|
|
541
|
+
pointer-events: none !important;
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
/* Provide proper drag cursors */
|
|
545
|
+
[data-component='draggable']:hover {
|
|
546
|
+
cursor: grab;
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
[data-component='draggable'].dragging {
|
|
550
|
+
cursor: grab;
|
|
518
551
|
}
|
|
552
|
+
|
|
553
|
+
|
|
554
|
+
|
|
555
|
+
|
|
519
556
|
</style>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hkdigital/lib-core",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.83",
|
|
4
4
|
"author": {
|
|
5
5
|
"name": "HKdigital",
|
|
6
6
|
"url": "https://hkdigital.nl"
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"upgrade:hk": "run-s upgrade:hk:update pnpm:install",
|
|
34
34
|
"upgrade:all": "run-s upgrade:all:update pnpm:install",
|
|
35
35
|
"svelte:sync": "svelte-kit sync",
|
|
36
|
-
"dev:start": "vite dev",
|
|
36
|
+
"dev:start": "vite dev --host",
|
|
37
37
|
"build:vite": "vite build",
|
|
38
38
|
"check:run": "svelte-check --tsconfig ./jsconfig.json",
|
|
39
39
|
"check:watch-run": "svelte-check --tsconfig ./jsconfig.json --watch",
|