dragselect 2.5.1 → 2.5.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/CHANGELOG.md +4 -0
- package/README.md +3 -3
- package/dist/DragSelect.es6m.js +36 -24
- package/dist/DragSelect.js +36 -24
- package/dist/ds.es6m.min.js +1 -1
- package/dist/ds.min.js +1 -1
- package/dist/modules/DropZone.d.ts +5 -3
- package/dist/types.d.ts +10 -1
- package/package.json +1 -1
- package/src/methods/hydrateSettings.js +176 -47
- package/src/modules/DropZone.js +12 -3
- package/src/modules/SelectableSet.js +17 -13
- package/src/types.js +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
# 2.5.2
|
|
2
|
+
|
|
3
|
+
- Make `droppables` within `dropZones` optional and use all selectables as default value if no droppables are provided.
|
|
4
|
+
|
|
1
5
|
# 2.5.1
|
|
2
6
|
|
|
3
7
|
- Fix: when an item had multiple dropzones, the `${droppedInsideClass}` was removed even tho’ the item was dropped inside a zone
|
package/README.md
CHANGED
|
@@ -170,8 +170,8 @@ const ds = new DragSelect({
|
|
|
170
170
|
selectables: document.querySelectorAll('.selectable-nodes'),
|
|
171
171
|
area: document.querySelector('#area'),
|
|
172
172
|
dropZones: [
|
|
173
|
-
{ element: document.querySelector('#zone-1'), id: 'zone-1',
|
|
174
|
-
{ element: document.querySelector('#zone-2'), id: 'zone-2', droppables: document.querySelectorAll('#item-2,#item-4') },
|
|
173
|
+
{ element: document.querySelector('#zone-1'), id: 'zone-1' }, // all selectables can be dropped into zone 1
|
|
174
|
+
{ element: document.querySelector('#zone-2'), id: 'zone-2', droppables: document.querySelectorAll('#item-2,#item-4') }, // only items 2 and 4 are droppable
|
|
175
175
|
],
|
|
176
176
|
dropInsideThreshold: 1, // 1 = has to be 100% inside the dropzone, 0.5 = 50% inside, 0 = just touching is fine
|
|
177
177
|
});
|
|
@@ -334,7 +334,7 @@ Here is the full list:
|
|
|
334
334
|
|keyboardDragSpeed |number |The speed at which elements are dragged using the keyboard. In pixels per keyDown. |`10`
|
|
335
335
|
|useTransform |boolean |Whether to use the more performant hardware accelerated css transforms when dragging instead of the top/left positions. |`true`
|
|
336
336
|
|refreshMemoryRate |number |Refresh rate on memoization, higher numbers mean better performance but more lag if elements are moving, lower numbers mean less lag but worse performance. If none of your DOMNodes are moving, you can set it to a very high number to increase performance. Value in milliseconds. |`80`
|
|
337
|
-
|dropZones |[{ id: 'string', element: single DOM element (node), droppables
|
|
337
|
+
|dropZones |[{ id: 'string', element: single DOM element (node), droppables?: DOM elements [nodes] }] |zones with association of droppable items that can be dropped into them. `id`: any unique identifying string. `element`: is the dropzone itself. `droppables`: the elements that can be dropped into that zone. This is optional, by default it is all selectables |`[]`
|
|
338
338
|
|dropInsideThreshold |number |How much % of the item has to be inside the dropzone to be considered inside (0 = barely touching, 1 = completely inside) |`1`
|
|
339
339
|
|dropTargetThreshold |number |How much % of the zone does the pointer has to be in to be considered a target (0 = anywhere in the zone, max: 0.5 = has to point at the center of the zone) |`0`
|
|
340
340
|
|usePointerEvents |boolean |Whether to use Pointer Events to replace traditional Mouse or Touch Events. Useful for tools like Google Blockly. |`false`
|
package/dist/DragSelect.es6m.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/***
|
|
2
2
|
|
|
3
|
-
~~~ Version 2.5.
|
|
3
|
+
~~~ Version 2.5.2 ~~~
|
|
4
4
|
|
|
5
5
|
******************************************
|
|
6
6
|
|
|
@@ -388,9 +388,9 @@ function _createForOfIteratorHelper(o, allowArrayLike) {
|
|
|
388
388
|
|
|
389
389
|
/**
|
|
390
390
|
* @typedef {Object} DSInputDropZone
|
|
391
|
-
* @property {string} id
|
|
392
|
-
* @property {DSElement} element
|
|
393
|
-
* @property {DSInputElements} droppables
|
|
391
|
+
* @property {string} id can be any unique identifier of type string
|
|
392
|
+
* @property {DSElement} element is the dropzone itself
|
|
393
|
+
* @property {DSInputElements} [droppables] the elements that can be dropped into that zone. This is optional, by default it will be all selectables
|
|
394
394
|
*/
|
|
395
395
|
/**
|
|
396
396
|
* @typedef {Object} DSDropZone
|
|
@@ -1079,8 +1079,8 @@ var handleUnSelection = (function (_ref) {
|
|
|
1079
1079
|
});
|
|
1080
1080
|
|
|
1081
1081
|
/**
|
|
1082
|
-
* @param {string} key
|
|
1083
|
-
* @param {string} type
|
|
1082
|
+
* @param {string} key
|
|
1083
|
+
* @param {string} type
|
|
1084
1084
|
* @param {*} fallback
|
|
1085
1085
|
* @returns {void}
|
|
1086
1086
|
*/
|
|
@@ -1089,10 +1089,10 @@ var wrongTypeWarn = function wrongTypeWarn(key, type, fallback) {
|
|
|
1089
1089
|
};
|
|
1090
1090
|
|
|
1091
1091
|
/**
|
|
1092
|
-
* @param {string} key
|
|
1092
|
+
* @param {string} key
|
|
1093
1093
|
* @param {*} value
|
|
1094
|
-
* @param {boolean} withFallback
|
|
1095
|
-
* @param {*} fallback
|
|
1094
|
+
* @param {boolean} withFallback
|
|
1095
|
+
* @param {*} fallback
|
|
1096
1096
|
* @returns {object}
|
|
1097
1097
|
*/
|
|
1098
1098
|
var hydrateHelper = function hydrateHelper(key, value, withFallback, fallback) {
|
|
@@ -1114,24 +1114,24 @@ var hydrateHelper = function hydrateHelper(key, value, withFallback, fallback) {
|
|
|
1114
1114
|
}
|
|
1115
1115
|
|
|
1116
1116
|
// TypeCheck [Number]
|
|
1117
|
-
var expectedNumber = !isNaN(fallback) && typeof fallback === 'number';
|
|
1118
|
-
if (expectedNumber) isAvailable = !isNaN(value) && typeof value === 'number';
|
|
1117
|
+
var expectedNumber = !Number.isNaN(fallback) && typeof fallback === 'number';
|
|
1118
|
+
if (expectedNumber) isAvailable = !Number.isNaN(value) && typeof value === 'number';
|
|
1119
1119
|
if (expectedNumber && !isAvailable) {
|
|
1120
1120
|
forceFallback = true;
|
|
1121
1121
|
wrongTypeWarn(key, 'number');
|
|
1122
1122
|
}
|
|
1123
1123
|
|
|
1124
1124
|
// TypeCheck [Object]
|
|
1125
|
-
var expectedObject = Object.prototype.toString.call(fallback) ===
|
|
1126
|
-
if (expectedObject) isAvailable = Object.prototype.toString.call(value) ===
|
|
1125
|
+
var expectedObject = Object.prototype.toString.call(fallback) === '[object Object]';
|
|
1126
|
+
if (expectedObject) isAvailable = Object.prototype.toString.call(value) === '[object Object]';
|
|
1127
1127
|
if (expectedObject && !isAvailable) {
|
|
1128
1128
|
forceFallback = true;
|
|
1129
1129
|
wrongTypeWarn(key, 'object');
|
|
1130
1130
|
}
|
|
1131
1131
|
|
|
1132
1132
|
// TypeCheck [Boolean]
|
|
1133
|
-
var expectedBoolean = typeof fallback ===
|
|
1134
|
-
if (expectedBoolean) isAvailable = typeof value ===
|
|
1133
|
+
var expectedBoolean = typeof fallback === 'boolean';
|
|
1134
|
+
if (expectedBoolean) isAvailable = typeof value === 'boolean';
|
|
1135
1135
|
if (expectedBoolean && !isAvailable) {
|
|
1136
1136
|
forceFallback = true;
|
|
1137
1137
|
wrongTypeWarn(key, 'boolean');
|
|
@@ -1147,24 +1147,27 @@ var hydrateHelper = function hydrateHelper(key, value, withFallback, fallback) {
|
|
|
1147
1147
|
var isFallback = forceFallback || withFallback;
|
|
1148
1148
|
|
|
1149
1149
|
// Special rule for [dragKeys]
|
|
1150
|
-
if (key === 'dragKeys' && isAvailable) return _defineProperty({}, key, Object.assign(fallback, value));
|
|
1150
|
+
if (key === 'dragKeys' && isAvailable) return _defineProperty({}, key, Object.assign(fallback, value));
|
|
1151
|
+
if (key === 'dragKeys' && !isAvailable) return isFallback ? _defineProperty({}, key, fallback) : {};
|
|
1151
1152
|
|
|
1152
1153
|
// Special rule for [dropZones]
|
|
1153
1154
|
if (key === 'dropZones' && isAvailable && new Set(value.map(function (v) {
|
|
1154
1155
|
return v.id;
|
|
1155
1156
|
})).size !== value.length) console.warn("[DragSelect] UniqueConstraintsIssue: setting \"dropZones\" contains duplicate ids.");
|
|
1156
|
-
|
|
1157
|
+
if (isAvailable) return _defineProperty({}, key, value);
|
|
1158
|
+
if (isFallback) return _defineProperty({}, key, fallback);
|
|
1159
|
+
return {};
|
|
1157
1160
|
};
|
|
1158
1161
|
|
|
1159
1162
|
/**
|
|
1160
1163
|
* This helper method creates the setting object,
|
|
1161
1164
|
* - if the settings provided are of wrong type, the fallback value will be used
|
|
1162
1165
|
* - - except for if settings are undefined or explicitly marked as "null"
|
|
1163
|
-
* - if "withfallback" is true, it will return the object with all settings:
|
|
1166
|
+
* - if "withfallback" is true, it will return the object with all settings:
|
|
1164
1167
|
* - - if not provided from the settings object (or wrong type), the fallback will be used
|
|
1165
1168
|
* (the fallback value for each setting is the last prop of the hydrateHelper)
|
|
1166
|
-
* @param {Settings} settings
|
|
1167
|
-
* @param {boolean} withFallback
|
|
1169
|
+
* @param {Settings} settings
|
|
1170
|
+
* @param {boolean} withFallback
|
|
1168
1171
|
*/
|
|
1169
1172
|
var hydrateSettings = (function (settings, withFallback) {
|
|
1170
1173
|
return _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, hydrateHelper('area', settings.area, withFallback, document)), hydrateHelper('selectables', settings.selectables, withFallback, null)), hydrateHelper('autoScrollSpeed', settings.autoScrollSpeed, withFallback, 5)), hydrateHelper('overflowTolerance', settings.overflowTolerance, withFallback, {
|
|
@@ -1817,7 +1820,7 @@ var DropZone = /*#__PURE__*/function () {
|
|
|
1817
1820
|
* @param {DragSelect} obj.DS
|
|
1818
1821
|
* @param {string} obj.id
|
|
1819
1822
|
* @param {DSElement} obj.element
|
|
1820
|
-
* @param {DSInputElements} obj.droppables
|
|
1823
|
+
* @param {DSInputElements} [obj.droppables]
|
|
1821
1824
|
* @ignore
|
|
1822
1825
|
*/
|
|
1823
1826
|
function DropZone(_ref) {
|
|
@@ -1829,7 +1832,7 @@ var DropZone = /*#__PURE__*/function () {
|
|
|
1829
1832
|
_classCallCheck(this, DropZone);
|
|
1830
1833
|
_defineProperty(this, "id", void 0);
|
|
1831
1834
|
_defineProperty(this, "element", void 0);
|
|
1832
|
-
_defineProperty(this, "
|
|
1835
|
+
_defineProperty(this, "_droppables", void 0);
|
|
1833
1836
|
_defineProperty(this, "_rect", void 0);
|
|
1834
1837
|
_defineProperty(this, "_observers", void 0);
|
|
1835
1838
|
_defineProperty(this, "_timeout", void 0);
|
|
@@ -1914,7 +1917,7 @@ var DropZone = /*#__PURE__*/function () {
|
|
|
1914
1917
|
this.Settings = DS.stores.SettingsStore.s;
|
|
1915
1918
|
this.id = id;
|
|
1916
1919
|
this.element = element;
|
|
1917
|
-
this.droppables = toArray(droppables);
|
|
1920
|
+
if (droppables) this.droppables = toArray(droppables);
|
|
1918
1921
|
this.element.classList.add("".concat(this.Settings.dropZoneClass));
|
|
1919
1922
|
|
|
1920
1923
|
// @ts-ignore: @todo: update to typescript
|
|
@@ -1996,6 +1999,15 @@ var DropZone = /*#__PURE__*/function () {
|
|
|
1996
1999
|
if (this._parentNodes) return this._parentNodes;
|
|
1997
2000
|
return this._parentNodes = getAllParentNodes(this.element);
|
|
1998
2001
|
}
|
|
2002
|
+
}, {
|
|
2003
|
+
key: "droppables",
|
|
2004
|
+
get: function get() {
|
|
2005
|
+
if (this._droppables) return this._droppables;
|
|
2006
|
+
return this.DS.SelectableSet.elements;
|
|
2007
|
+
},
|
|
2008
|
+
set: function set(value) {
|
|
2009
|
+
this._droppables = value;
|
|
2010
|
+
}
|
|
1999
2011
|
}]);
|
|
2000
2012
|
return DropZone;
|
|
2001
2013
|
}();
|
|
@@ -2422,7 +2434,7 @@ var SelectableSet = /*#__PURE__*/function (_Set) {
|
|
|
2422
2434
|
var settings = _ref2.settings;
|
|
2423
2435
|
_this.forEach(function (el) {
|
|
2424
2436
|
el.classList.remove(settings['selectableClass:pre']);
|
|
2425
|
-
el.classList.add(settings
|
|
2437
|
+
el.classList.add(settings.selectableClass);
|
|
2426
2438
|
});
|
|
2427
2439
|
});
|
|
2428
2440
|
return _this;
|
package/dist/DragSelect.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/***
|
|
2
2
|
|
|
3
|
-
~~~ Version 2.5.
|
|
3
|
+
~~~ Version 2.5.2 ~~~
|
|
4
4
|
|
|
5
5
|
******************************************
|
|
6
6
|
|
|
@@ -394,9 +394,9 @@
|
|
|
394
394
|
|
|
395
395
|
/**
|
|
396
396
|
* @typedef {Object} DSInputDropZone
|
|
397
|
-
* @property {string} id
|
|
398
|
-
* @property {DSElement} element
|
|
399
|
-
* @property {DSInputElements} droppables
|
|
397
|
+
* @property {string} id can be any unique identifier of type string
|
|
398
|
+
* @property {DSElement} element is the dropzone itself
|
|
399
|
+
* @property {DSInputElements} [droppables] the elements that can be dropped into that zone. This is optional, by default it will be all selectables
|
|
400
400
|
*/
|
|
401
401
|
/**
|
|
402
402
|
* @typedef {Object} DSDropZone
|
|
@@ -1085,8 +1085,8 @@
|
|
|
1085
1085
|
});
|
|
1086
1086
|
|
|
1087
1087
|
/**
|
|
1088
|
-
* @param {string} key
|
|
1089
|
-
* @param {string} type
|
|
1088
|
+
* @param {string} key
|
|
1089
|
+
* @param {string} type
|
|
1090
1090
|
* @param {*} fallback
|
|
1091
1091
|
* @returns {void}
|
|
1092
1092
|
*/
|
|
@@ -1095,10 +1095,10 @@
|
|
|
1095
1095
|
};
|
|
1096
1096
|
|
|
1097
1097
|
/**
|
|
1098
|
-
* @param {string} key
|
|
1098
|
+
* @param {string} key
|
|
1099
1099
|
* @param {*} value
|
|
1100
|
-
* @param {boolean} withFallback
|
|
1101
|
-
* @param {*} fallback
|
|
1100
|
+
* @param {boolean} withFallback
|
|
1101
|
+
* @param {*} fallback
|
|
1102
1102
|
* @returns {object}
|
|
1103
1103
|
*/
|
|
1104
1104
|
var hydrateHelper = function hydrateHelper(key, value, withFallback, fallback) {
|
|
@@ -1120,24 +1120,24 @@
|
|
|
1120
1120
|
}
|
|
1121
1121
|
|
|
1122
1122
|
// TypeCheck [Number]
|
|
1123
|
-
var expectedNumber = !isNaN(fallback) && typeof fallback === 'number';
|
|
1124
|
-
if (expectedNumber) isAvailable = !isNaN(value) && typeof value === 'number';
|
|
1123
|
+
var expectedNumber = !Number.isNaN(fallback) && typeof fallback === 'number';
|
|
1124
|
+
if (expectedNumber) isAvailable = !Number.isNaN(value) && typeof value === 'number';
|
|
1125
1125
|
if (expectedNumber && !isAvailable) {
|
|
1126
1126
|
forceFallback = true;
|
|
1127
1127
|
wrongTypeWarn(key, 'number');
|
|
1128
1128
|
}
|
|
1129
1129
|
|
|
1130
1130
|
// TypeCheck [Object]
|
|
1131
|
-
var expectedObject = Object.prototype.toString.call(fallback) ===
|
|
1132
|
-
if (expectedObject) isAvailable = Object.prototype.toString.call(value) ===
|
|
1131
|
+
var expectedObject = Object.prototype.toString.call(fallback) === '[object Object]';
|
|
1132
|
+
if (expectedObject) isAvailable = Object.prototype.toString.call(value) === '[object Object]';
|
|
1133
1133
|
if (expectedObject && !isAvailable) {
|
|
1134
1134
|
forceFallback = true;
|
|
1135
1135
|
wrongTypeWarn(key, 'object');
|
|
1136
1136
|
}
|
|
1137
1137
|
|
|
1138
1138
|
// TypeCheck [Boolean]
|
|
1139
|
-
var expectedBoolean = typeof fallback ===
|
|
1140
|
-
if (expectedBoolean) isAvailable = typeof value ===
|
|
1139
|
+
var expectedBoolean = typeof fallback === 'boolean';
|
|
1140
|
+
if (expectedBoolean) isAvailable = typeof value === 'boolean';
|
|
1141
1141
|
if (expectedBoolean && !isAvailable) {
|
|
1142
1142
|
forceFallback = true;
|
|
1143
1143
|
wrongTypeWarn(key, 'boolean');
|
|
@@ -1153,24 +1153,27 @@
|
|
|
1153
1153
|
var isFallback = forceFallback || withFallback;
|
|
1154
1154
|
|
|
1155
1155
|
// Special rule for [dragKeys]
|
|
1156
|
-
if (key === 'dragKeys' && isAvailable) return _defineProperty({}, key, Object.assign(fallback, value));
|
|
1156
|
+
if (key === 'dragKeys' && isAvailable) return _defineProperty({}, key, Object.assign(fallback, value));
|
|
1157
|
+
if (key === 'dragKeys' && !isAvailable) return isFallback ? _defineProperty({}, key, fallback) : {};
|
|
1157
1158
|
|
|
1158
1159
|
// Special rule for [dropZones]
|
|
1159
1160
|
if (key === 'dropZones' && isAvailable && new Set(value.map(function (v) {
|
|
1160
1161
|
return v.id;
|
|
1161
1162
|
})).size !== value.length) console.warn("[DragSelect] UniqueConstraintsIssue: setting \"dropZones\" contains duplicate ids.");
|
|
1162
|
-
|
|
1163
|
+
if (isAvailable) return _defineProperty({}, key, value);
|
|
1164
|
+
if (isFallback) return _defineProperty({}, key, fallback);
|
|
1165
|
+
return {};
|
|
1163
1166
|
};
|
|
1164
1167
|
|
|
1165
1168
|
/**
|
|
1166
1169
|
* This helper method creates the setting object,
|
|
1167
1170
|
* - if the settings provided are of wrong type, the fallback value will be used
|
|
1168
1171
|
* - - except for if settings are undefined or explicitly marked as "null"
|
|
1169
|
-
* - if "withfallback" is true, it will return the object with all settings:
|
|
1172
|
+
* - if "withfallback" is true, it will return the object with all settings:
|
|
1170
1173
|
* - - if not provided from the settings object (or wrong type), the fallback will be used
|
|
1171
1174
|
* (the fallback value for each setting is the last prop of the hydrateHelper)
|
|
1172
|
-
* @param {Settings} settings
|
|
1173
|
-
* @param {boolean} withFallback
|
|
1175
|
+
* @param {Settings} settings
|
|
1176
|
+
* @param {boolean} withFallback
|
|
1174
1177
|
*/
|
|
1175
1178
|
var hydrateSettings = (function (settings, withFallback) {
|
|
1176
1179
|
return _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, hydrateHelper('area', settings.area, withFallback, document)), hydrateHelper('selectables', settings.selectables, withFallback, null)), hydrateHelper('autoScrollSpeed', settings.autoScrollSpeed, withFallback, 5)), hydrateHelper('overflowTolerance', settings.overflowTolerance, withFallback, {
|
|
@@ -1823,7 +1826,7 @@
|
|
|
1823
1826
|
* @param {DragSelect} obj.DS
|
|
1824
1827
|
* @param {string} obj.id
|
|
1825
1828
|
* @param {DSElement} obj.element
|
|
1826
|
-
* @param {DSInputElements} obj.droppables
|
|
1829
|
+
* @param {DSInputElements} [obj.droppables]
|
|
1827
1830
|
* @ignore
|
|
1828
1831
|
*/
|
|
1829
1832
|
function DropZone(_ref) {
|
|
@@ -1835,7 +1838,7 @@
|
|
|
1835
1838
|
_classCallCheck(this, DropZone);
|
|
1836
1839
|
_defineProperty(this, "id", void 0);
|
|
1837
1840
|
_defineProperty(this, "element", void 0);
|
|
1838
|
-
_defineProperty(this, "
|
|
1841
|
+
_defineProperty(this, "_droppables", void 0);
|
|
1839
1842
|
_defineProperty(this, "_rect", void 0);
|
|
1840
1843
|
_defineProperty(this, "_observers", void 0);
|
|
1841
1844
|
_defineProperty(this, "_timeout", void 0);
|
|
@@ -1920,7 +1923,7 @@
|
|
|
1920
1923
|
this.Settings = DS.stores.SettingsStore.s;
|
|
1921
1924
|
this.id = id;
|
|
1922
1925
|
this.element = element;
|
|
1923
|
-
this.droppables = toArray(droppables);
|
|
1926
|
+
if (droppables) this.droppables = toArray(droppables);
|
|
1924
1927
|
this.element.classList.add("".concat(this.Settings.dropZoneClass));
|
|
1925
1928
|
|
|
1926
1929
|
// @ts-ignore: @todo: update to typescript
|
|
@@ -2002,6 +2005,15 @@
|
|
|
2002
2005
|
if (this._parentNodes) return this._parentNodes;
|
|
2003
2006
|
return this._parentNodes = getAllParentNodes(this.element);
|
|
2004
2007
|
}
|
|
2008
|
+
}, {
|
|
2009
|
+
key: "droppables",
|
|
2010
|
+
get: function get() {
|
|
2011
|
+
if (this._droppables) return this._droppables;
|
|
2012
|
+
return this.DS.SelectableSet.elements;
|
|
2013
|
+
},
|
|
2014
|
+
set: function set(value) {
|
|
2015
|
+
this._droppables = value;
|
|
2016
|
+
}
|
|
2005
2017
|
}]);
|
|
2006
2018
|
return DropZone;
|
|
2007
2019
|
}();
|
|
@@ -2428,7 +2440,7 @@
|
|
|
2428
2440
|
var settings = _ref2.settings;
|
|
2429
2441
|
_this.forEach(function (el) {
|
|
2430
2442
|
el.classList.remove(settings['selectableClass:pre']);
|
|
2431
|
-
el.classList.add(settings
|
|
2443
|
+
el.classList.add(settings.selectableClass);
|
|
2432
2444
|
});
|
|
2433
2445
|
});
|
|
2434
2446
|
return _this;
|