mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-30 22:18:46 +02:00
Use npm for gridstack, remove unnecessary folders using our dedicated service
This commit is contained in:
31
node_modules/gridstack/dist/dd-resizable-handle.js
generated
vendored
31
node_modules/gridstack/dist/dd-resizable-handle.js
generated
vendored
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* dd-resizable-handle.ts 12.3.2
|
||||
* dd-resizable-handle.ts 12.4.2
|
||||
* Copyright (c) 2021-2025 Alain Dumesny - see GridStack root license
|
||||
*/
|
||||
import { isTouch, pointerdown, touchend, touchmove, touchstart } from './dd-touch';
|
||||
@@ -19,12 +19,25 @@ class DDResizableHandle {
|
||||
}
|
||||
/** @internal */
|
||||
_init() {
|
||||
const el = this.el = document.createElement('div');
|
||||
el.classList.add('ui-resizable-handle');
|
||||
el.classList.add(`${DDResizableHandle.prefix}${this.dir}`);
|
||||
el.style.zIndex = '100';
|
||||
el.style.userSelect = 'none';
|
||||
this.host.appendChild(this.el);
|
||||
if (this.option.element) {
|
||||
try {
|
||||
this.el = this.option.element instanceof HTMLElement
|
||||
? this.option.element
|
||||
: this.host.querySelector(this.option.element);
|
||||
}
|
||||
catch (error) {
|
||||
this.option.element = undefined; // make sure destroy handles it correctly
|
||||
console.error("Query for resizeable handle failed, falling back", error);
|
||||
}
|
||||
}
|
||||
if (!this.el) {
|
||||
this.el = document.createElement('div');
|
||||
this.host.appendChild(this.el);
|
||||
}
|
||||
this.el.classList.add('ui-resizable-handle');
|
||||
this.el.classList.add(`${DDResizableHandle.prefix}${this.dir}`);
|
||||
this.el.style.zIndex = '100';
|
||||
this.el.style.userSelect = 'none';
|
||||
this.el.addEventListener('mousedown', this._mouseDown);
|
||||
if (isTouch) {
|
||||
this.el.addEventListener('touchstart', touchstart);
|
||||
@@ -42,7 +55,9 @@ class DDResizableHandle {
|
||||
this.el.removeEventListener('touchstart', touchstart);
|
||||
this.el.removeEventListener('pointerdown', pointerdown);
|
||||
}
|
||||
this.host.removeChild(this.el);
|
||||
if (!this.option.element) {
|
||||
this.host.removeChild(this.el);
|
||||
}
|
||||
delete this.el;
|
||||
delete this.host;
|
||||
return this;
|
||||
|
||||
Reference in New Issue
Block a user