uiik 1.4.1 → 1.4.2
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/index.esm.js +8 -4
- package/index.js +8 -4
- package/package.json +1 -1
package/index.esm.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* uiik v1.4.
|
|
2
|
+
* uiik v1.4.2
|
|
3
3
|
* A UI interactions kit includes draggable, splittable, rotatable, selectable, etc.
|
|
4
4
|
* https://github.com/holyhigh2/uiik
|
|
5
|
-
* c) 2021-
|
|
5
|
+
* c) 2021-2026 @holyhigh2 may be freely distributed under the MIT license
|
|
6
6
|
*/
|
|
7
7
|
import { find, map, toArray, each, reject, includes, some, flatMap, size } from 'myfx/collection';
|
|
8
8
|
import { isDefined, isNumber, isNaN, isString, isArrayLike, isElement, isEmpty, isBlank, isArray, isFunction, isBoolean, isUndefined } from 'myfx/is';
|
|
@@ -1673,7 +1673,7 @@ class Draggable extends Uii {
|
|
|
1673
1673
|
return true;
|
|
1674
1674
|
let opts = {};
|
|
1675
1675
|
let findRs = closest(t, (node) => node && get(node, UII_KEY), "parentElement");
|
|
1676
|
-
if (!findRs) {
|
|
1676
|
+
if (!findRs || isEmpty(OPTION_MAP.get(findRs))) {
|
|
1677
1677
|
let toBreak = true;
|
|
1678
1678
|
each(WATCH_MAP, (v, k) => {
|
|
1679
1679
|
draggableList = bindTarget.querySelectorAll(eleString);
|
|
@@ -2094,6 +2094,8 @@ class Draggable extends Uii {
|
|
|
2094
2094
|
}
|
|
2095
2095
|
_Draggable_container = new WeakMap(), _Draggable_instances = new WeakSet(), _Draggable_initHandle = function _Draggable_initHandle(ele) {
|
|
2096
2096
|
each(ele, (el) => {
|
|
2097
|
+
if (HANDLE_MAP.has(el))
|
|
2098
|
+
return;
|
|
2097
2099
|
let h;
|
|
2098
2100
|
if (isString(this.opts.handle)) {
|
|
2099
2101
|
h = el.querySelector(this.opts.handle);
|
|
@@ -2109,6 +2111,8 @@ _Draggable_container = new WeakMap(), _Draggable_instances = new WeakSet(), _Dra
|
|
|
2109
2111
|
});
|
|
2110
2112
|
}, _Draggable_initStyle = function _Draggable_initStyle(draggableList) {
|
|
2111
2113
|
each(draggableList, (el) => {
|
|
2114
|
+
if (OPTION_MAP.has(el))
|
|
2115
|
+
return;
|
|
2112
2116
|
if (isDefined(this.opts.type))
|
|
2113
2117
|
el.dataset.dropType = this.opts.type;
|
|
2114
2118
|
el.classList.toggle(CLASS_DRAGGABLE, true);
|
|
@@ -3046,7 +3050,7 @@ function newSortable(container, opts) {
|
|
|
3046
3050
|
return new Sortable(container, opts);
|
|
3047
3051
|
}
|
|
3048
3052
|
|
|
3049
|
-
var version = "1.4.
|
|
3053
|
+
var version = "1.4.2";
|
|
3050
3054
|
var repository = {
|
|
3051
3055
|
type: "git",
|
|
3052
3056
|
url: "https://github.com/holyhigh2/uiik"
|
package/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* uiik v1.4.
|
|
2
|
+
* uiik v1.4.2
|
|
3
3
|
* A UI interactions kit includes draggable, splittable, rotatable, selectable, etc.
|
|
4
4
|
* https://github.com/holyhigh2/uiik
|
|
5
|
-
* c) 2021-
|
|
5
|
+
* c) 2021-2026 @holyhigh2 may be freely distributed under the MIT license
|
|
6
6
|
*/
|
|
7
7
|
(function (global, factory) {
|
|
8
8
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('myfx/collection'), require('myfx/is'), require('myfx/object'), require('myfx/tree'), require('myfx'), require('myfx/array'), require('myfx/string'), require('myfx/utils')) :
|
|
@@ -1670,7 +1670,7 @@
|
|
|
1670
1670
|
return true;
|
|
1671
1671
|
let opts = {};
|
|
1672
1672
|
let findRs = tree.closest(t, (node) => node && object.get(node, UII_KEY), "parentElement");
|
|
1673
|
-
if (!findRs) {
|
|
1673
|
+
if (!findRs || is.isEmpty(OPTION_MAP.get(findRs))) {
|
|
1674
1674
|
let toBreak = true;
|
|
1675
1675
|
collection.each(WATCH_MAP, (v, k) => {
|
|
1676
1676
|
draggableList = bindTarget.querySelectorAll(eleString);
|
|
@@ -2091,6 +2091,8 @@
|
|
|
2091
2091
|
}
|
|
2092
2092
|
_Draggable_container = new WeakMap(), _Draggable_instances = new WeakSet(), _Draggable_initHandle = function _Draggable_initHandle(ele) {
|
|
2093
2093
|
collection.each(ele, (el) => {
|
|
2094
|
+
if (HANDLE_MAP.has(el))
|
|
2095
|
+
return;
|
|
2094
2096
|
let h;
|
|
2095
2097
|
if (is.isString(this.opts.handle)) {
|
|
2096
2098
|
h = el.querySelector(this.opts.handle);
|
|
@@ -2106,6 +2108,8 @@
|
|
|
2106
2108
|
});
|
|
2107
2109
|
}, _Draggable_initStyle = function _Draggable_initStyle(draggableList) {
|
|
2108
2110
|
collection.each(draggableList, (el) => {
|
|
2111
|
+
if (OPTION_MAP.has(el))
|
|
2112
|
+
return;
|
|
2109
2113
|
if (is.isDefined(this.opts.type))
|
|
2110
2114
|
el.dataset.dropType = this.opts.type;
|
|
2111
2115
|
el.classList.toggle(CLASS_DRAGGABLE, true);
|
|
@@ -3043,7 +3047,7 @@
|
|
|
3043
3047
|
return new Sortable(container, opts);
|
|
3044
3048
|
}
|
|
3045
3049
|
|
|
3046
|
-
var version = "1.4.
|
|
3050
|
+
var version = "1.4.2";
|
|
3047
3051
|
var repository = {
|
|
3048
3052
|
type: "git",
|
|
3049
3053
|
url: "https://github.com/holyhigh2/uiik"
|