neo.mjs 4.0.67 → 4.0.68
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/package.json
CHANGED
package/src/Xhr.mjs
CHANGED
@@ -217,6 +217,15 @@ class Xhr extends Base {
|
|
217
217
|
|
218
218
|
return this.request(opts);
|
219
219
|
}
|
220
|
+
|
221
|
+
/**
|
222
|
+
* Needed for remote method access
|
223
|
+
*
|
224
|
+
* @param {Object} value
|
225
|
+
*/
|
226
|
+
setDefaultHeaders(value) {
|
227
|
+
this.defaultHeaders = value;
|
228
|
+
}
|
220
229
|
}
|
221
230
|
|
222
231
|
Neo.applyClassConfig(Xhr);
|
@@ -149,14 +149,16 @@ class DragDrop extends Base {
|
|
149
149
|
|
150
150
|
me.addGlobalEventListeners();
|
151
151
|
|
152
|
+
if (Neo.config.hasMouseEvents) {
|
153
|
+
imports.push(import('../draggable/sensor/Mouse.mjs'));
|
154
|
+
}
|
155
|
+
|
152
156
|
if (Neo.config.hasTouchEvents) {
|
153
157
|
imports.push(import('../draggable/sensor/Touch.mjs'));
|
154
|
-
} else {
|
155
|
-
imports.push(import('../draggable/sensor/Mouse.mjs'));
|
156
158
|
}
|
157
159
|
|
158
160
|
Promise.all(imports).then(modules => {
|
159
|
-
// create the
|
161
|
+
// create the Mouse- and / or TouchSensor
|
160
162
|
Neo.create({
|
161
163
|
module: modules[0].default
|
162
164
|
});
|
package/src/worker/Manager.mjs
CHANGED
@@ -204,6 +204,7 @@ class Manager extends Base {
|
|
204
204
|
detectFeatures() {
|
205
205
|
let me = this;
|
206
206
|
|
207
|
+
NeoConfig.hasMouseEvents = matchMedia('(pointer:fine)').matches;
|
207
208
|
NeoConfig.hasTouchEvents = ('ontouchstart' in window) || (navigator.maxTouchPoints > 0);
|
208
209
|
|
209
210
|
if (window.Worker) {
|