@progress/kendo-charts 1.21.0 → 1.23.0-dev.202201120958

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.
Files changed (68) hide show
  1. package/dist/cdn/js/kendo-charts.js +1 -1
  2. package/dist/cdn/main.js +1 -1
  3. package/dist/es/barcode/barcode-validator.js +50 -0
  4. package/dist/es/barcode.js +1 -0
  5. package/dist/es/common/keys.js +25 -0
  6. package/dist/es/common.js +1 -0
  7. package/dist/es/drawing-utils.js +27 -3
  8. package/dist/es/main.js +1 -0
  9. package/dist/es/map/attribution.js +157 -0
  10. package/dist/es/map/crs.js +277 -0
  11. package/dist/es/map/datums.js +16 -0
  12. package/dist/es/map/extent.js +129 -0
  13. package/dist/es/map/layers/bubble.js +185 -0
  14. package/dist/es/map/layers/layer.js +140 -0
  15. package/dist/es/map/layers/marker.js +348 -0
  16. package/dist/es/map/layers/shape.js +390 -0
  17. package/dist/es/map/layers/tile.js +481 -0
  18. package/dist/es/map/location.js +201 -0
  19. package/dist/es/map/map.js +929 -0
  20. package/dist/es/map/navigator.js +174 -0
  21. package/dist/es/map/scroller/draggable.js +454 -0
  22. package/dist/es/map/scroller/fx.js +119 -0
  23. package/dist/es/map/scroller/observable.js +151 -0
  24. package/dist/es/map/scroller/scroller.js +746 -0
  25. package/dist/es/map/scroller/user-events.js +712 -0
  26. package/dist/es/map/utils.js +450 -0
  27. package/dist/es/map/zoom.js +139 -0
  28. package/dist/es/map.js +1 -0
  29. package/dist/es/qrcode/qrcode-validator.js +24 -0
  30. package/dist/es/qrcode.js +1 -0
  31. package/dist/es/services/map-service.js +15 -0
  32. package/dist/es2015/barcode/barcode-validator.js +48 -0
  33. package/dist/es2015/barcode.js +1 -0
  34. package/dist/es2015/common/keys.js +25 -0
  35. package/dist/es2015/common.js +1 -0
  36. package/dist/es2015/drawing-utils.js +43 -3
  37. package/dist/es2015/main.js +1 -0
  38. package/dist/es2015/map/attribution.js +147 -0
  39. package/dist/es2015/map/crs.js +233 -0
  40. package/dist/es2015/map/datums.js +16 -0
  41. package/dist/es2015/map/extent.js +115 -0
  42. package/dist/es2015/map/layers/bubble.js +167 -0
  43. package/dist/es2015/map/layers/layer.js +134 -0
  44. package/dist/es2015/map/layers/marker.js +328 -0
  45. package/dist/es2015/map/layers/shape.js +370 -0
  46. package/dist/es2015/map/layers/tile.js +455 -0
  47. package/dist/es2015/map/location.js +193 -0
  48. package/dist/es2015/map/map.js +905 -0
  49. package/dist/es2015/map/navigator.js +169 -0
  50. package/dist/es2015/map/scroller/draggable.js +418 -0
  51. package/dist/es2015/map/scroller/fx.js +112 -0
  52. package/dist/es2015/map/scroller/observable.js +143 -0
  53. package/dist/es2015/map/scroller/scroller.js +716 -0
  54. package/dist/es2015/map/scroller/user-events.js +694 -0
  55. package/dist/es2015/map/utils.js +450 -0
  56. package/dist/es2015/map/zoom.js +134 -0
  57. package/dist/es2015/map.js +1 -0
  58. package/dist/es2015/qrcode/qrcode-validator.js +22 -0
  59. package/dist/es2015/qrcode.js +1 -0
  60. package/dist/es2015/services/map-service.js +15 -0
  61. package/dist/npm/barcode.d.ts +4 -1
  62. package/dist/npm/main.d.ts +2 -0
  63. package/dist/npm/main.js +6227 -329
  64. package/dist/npm/map.d.ts +4 -0
  65. package/dist/npm/qrcode.d.ts +3 -0
  66. package/dist/npm/validation.d.ts +9 -0
  67. package/dist/systemjs/kendo-charts.js +1 -1
  68. package/package.json +3 -3
@@ -0,0 +1,694 @@
1
+ import {
2
+ Class,
3
+ grep
4
+ } from '../../common';
5
+
6
+ import {
7
+ proxy,
8
+ noop,
9
+ applyEventMap,
10
+ getEventMap,
11
+ on,
12
+ off,
13
+ now,
14
+ getSupportedFeatures
15
+ } from '../utils';
16
+
17
+ import {
18
+ Observable
19
+ } from './observable';
20
+
21
+ const extend = Object.assign;
22
+
23
+ const preventDefault = (e) => {
24
+ e.preventDefault();
25
+ };
26
+
27
+ let
28
+ DEFAULT_MIN_HOLD = 800,
29
+ CLICK_DELAY = 300,
30
+ // DEFAULT_THRESHOLD = support.browser.msie ? 5 : 0,
31
+ DEFAULT_THRESHOLD = 0,
32
+ PRESS = 'press',
33
+ HOLD = 'hold',
34
+ SELECT = 'select',
35
+ START = 'start',
36
+ MOVE = 'move',
37
+ END = 'end',
38
+ CANCEL = 'cancel',
39
+ TAP = 'tap',
40
+ DOUBLETAP = 'doubleTap',
41
+ RELEASE = 'release',
42
+ GESTURESTART = 'gesturestart',
43
+ GESTURECHANGE = 'gesturechange',
44
+ GESTUREEND = 'gestureend',
45
+ GESTURETAP = 'gesturetap';
46
+
47
+ let THRESHOLD = {
48
+ 'api': 0,
49
+ 'touch': 0,
50
+ 'mouse': 9,
51
+ 'pointer': 9
52
+ };
53
+
54
+ function touchDelta(touch1, touch2) {
55
+ let x1 = touch1.x.location,
56
+ y1 = touch1.y.location,
57
+ x2 = touch2.x.location,
58
+ y2 = touch2.y.location,
59
+ dx = x1 - x2,
60
+ dy = y1 - y2;
61
+
62
+ return {
63
+ center: {
64
+ x: (x1 + x2) / 2,
65
+ y: (y1 + y2) / 2
66
+ },
67
+ distance: Math.sqrt(dx * dx + dy * dy)
68
+ };
69
+ }
70
+
71
+ function getTouches(e) {
72
+ const support = getSupportedFeatures();
73
+ let touches = [],
74
+ originalEvent = e.originalEvent || e,
75
+ currentTarget = e.currentTarget,
76
+ idx = 0,
77
+ length, changedTouches, touch;
78
+
79
+ if (e.api) {
80
+ touches.push({
81
+ id: 2,
82
+ event: e,
83
+ target: e.target,
84
+ currentTarget: e.target,
85
+ location: e,
86
+ type: 'api'
87
+ });
88
+ } else if (e.type.match(/touch/)) {
89
+ changedTouches = originalEvent ? originalEvent.changedTouches : [];
90
+
91
+ for (length = changedTouches.length; idx < length; idx++) {
92
+ touch = changedTouches[idx];
93
+ touches.push({
94
+ location: touch,
95
+ event: e,
96
+ target: touch.target,
97
+ currentTarget: currentTarget,
98
+ id: touch.identifier,
99
+ type: 'touch'
100
+ });
101
+ }
102
+ } else if (support.pointers || support.msPointers) {
103
+ touches.push({
104
+ location: originalEvent,
105
+ event: e,
106
+ target: e.target,
107
+ currentTarget: currentTarget,
108
+ id: originalEvent.pointerId,
109
+ type: 'pointer'
110
+ });
111
+ } else {
112
+ touches.push({
113
+ id: 1,
114
+ event: e,
115
+ target: e.target,
116
+ currentTarget: currentTarget,
117
+ location: e,
118
+ type: 'mouse'
119
+ });
120
+ }
121
+
122
+ return touches;
123
+ }
124
+ export class TouchAxis extends Class {
125
+ constructor(axis, location) {
126
+ super();
127
+ let that = this;
128
+
129
+ that.support = getSupportedFeatures();
130
+ that.invalidZeroEvents = this.support.mobileOS && this.support.mobileOS.android;
131
+ that.axis = axis;
132
+ that._updateLocationData(location);
133
+ that.startLocation = that.location;
134
+ that.velocity = that.delta = 0;
135
+ that.timeStamp = now();
136
+ }
137
+
138
+ move(location) {
139
+ let that = this,
140
+ offset = location['page' + that.axis],
141
+ timeStamp = now(),
142
+ timeDelta = timeStamp - that.timeStamp || 1;
143
+
144
+ if (!offset && this.invalidZeroEvents) {
145
+ return;
146
+ }
147
+
148
+ that.delta = offset - that.location;
149
+ that._updateLocationData(location);
150
+ that.initialDelta = offset - that.startLocation;
151
+ that.velocity = that.delta / timeDelta;
152
+ that.timeStamp = timeStamp;
153
+ }
154
+
155
+ _updateLocationData(location) {
156
+ let that = this,
157
+ axis = that.axis;
158
+
159
+ that.location = location['page' + axis];
160
+ that.client = location['client' + axis];
161
+ that.screen = location['screen' + axis];
162
+ }
163
+ }
164
+
165
+ export class Touch extends Class {
166
+ constructor(userEvents, target, touchInfo) {
167
+ super();
168
+
169
+ extend(this, {
170
+ x: new TouchAxis('X', touchInfo.location),
171
+ y: new TouchAxis('Y', touchInfo.location),
172
+ type: touchInfo.type,
173
+ useClickAsTap: userEvents.useClickAsTap,
174
+ threshold: userEvents.threshold || THRESHOLD[touchInfo.type],
175
+ userEvents: userEvents,
176
+ target: target,
177
+ currentTarget: touchInfo.currentTarget,
178
+ initialTouch: touchInfo.target,
179
+ id: touchInfo.id,
180
+ pressEvent: touchInfo,
181
+ _clicks: userEvents._clicks,
182
+ supportDoubleTap: userEvents.supportDoubleTap,
183
+ _moved: false,
184
+ _finished: false
185
+ });
186
+ }
187
+
188
+ press() {
189
+ // this._holdTimeout = setTimeout($.proxy(this, '_hold'), this.userEvents.minHold);
190
+ this._holdTimeout = setTimeout(proxy(this._hold, this), this.userEvents.minHold);
191
+ this._trigger(PRESS, this.pressEvent);
192
+ }
193
+
194
+ _tap(touchInfo) {
195
+ let that = this;
196
+
197
+ that.userEvents._clicks++;
198
+
199
+ if (that.userEvents._clicks === 1) {
200
+ that._clickTimeout = setTimeout(function() {
201
+ if (that.userEvents._clicks === 1) {
202
+ that._trigger(TAP, touchInfo);
203
+ } else {
204
+ that._trigger(DOUBLETAP, touchInfo);
205
+ }
206
+
207
+ that.userEvents._clicks = 0;
208
+ }, CLICK_DELAY);
209
+ }
210
+ }
211
+
212
+ _hold() {
213
+ this._trigger(HOLD, this.pressEvent);
214
+ }
215
+
216
+ /* eslint-disable consistent-return */
217
+ move(touchInfo) {
218
+ let that = this;
219
+ let preventMove = touchInfo.type !== 'api' && that.userEvents._shouldNotMove;
220
+
221
+ if (that._finished || preventMove) {
222
+ return;
223
+ }
224
+
225
+ that.x.move(touchInfo.location);
226
+ that.y.move(touchInfo.location);
227
+
228
+ if (!that._moved) {
229
+ if (that._withinIgnoreThreshold()) {
230
+ return;
231
+ }
232
+
233
+ if (!UserEvents.current || UserEvents.current === that.userEvents) {
234
+ that._start(touchInfo);
235
+ } else {
236
+ return that.dispose();
237
+ }
238
+ }
239
+
240
+ if (!that._finished) {
241
+ that._trigger(MOVE, touchInfo);
242
+ }
243
+ }
244
+ /* eslint-enable consistent-return */
245
+
246
+ end(touchInfo) {
247
+ this.endTime = now();
248
+
249
+ if (this._finished) {
250
+ return;
251
+ }
252
+
253
+ this._finished = true;
254
+ this._trigger(RELEASE, touchInfo);
255
+
256
+ if (this._moved) {
257
+ this._trigger(END, touchInfo);
258
+ } else {
259
+ if (!this.useClickAsTap) {
260
+ if (this.supportDoubleTap) {
261
+ this._tap(touchInfo);
262
+ } else {
263
+ this._trigger(TAP, touchInfo);
264
+ }
265
+ }
266
+ }
267
+
268
+ clearTimeout(this._holdTimeout);
269
+ this.dispose();
270
+ }
271
+
272
+ dispose() {
273
+ let userEvents = this.userEvents,
274
+ activeTouches = userEvents.touches || [];
275
+
276
+ this._finished = true;
277
+ this.pressEvent = null;
278
+
279
+ clearTimeout(this._holdTimeout);
280
+ // activeTouches.splice($.inArray(this, activeTouches), 1);
281
+ const activeTouchIndex = activeTouches.indexOf(this);
282
+ activeTouches.splice(activeTouchIndex, 1);
283
+ }
284
+
285
+ skip() {
286
+ this.dispose();
287
+ }
288
+
289
+ cancel() {
290
+ this.dispose();
291
+ }
292
+
293
+ isMoved() {
294
+ return this._moved;
295
+ }
296
+
297
+ _start(touchInfo) {
298
+ clearTimeout(this._holdTimeout);
299
+ this.startTime = now();
300
+ this._moved = true;
301
+ this._trigger(START, touchInfo);
302
+ }
303
+
304
+ _trigger(name, touchInfo) {
305
+ let that = this,
306
+ jQueryEvent = touchInfo.event,
307
+ data = {
308
+ touch: that,
309
+ x: that.x,
310
+ y: that.y,
311
+ target: that.target,
312
+ event: jQueryEvent
313
+ };
314
+ if (that.userEvents.notify(name, data)) {
315
+ jQueryEvent.preventDefault();
316
+ }
317
+ }
318
+
319
+ _withinIgnoreThreshold() {
320
+ let xDelta = this.x.initialDelta,
321
+ yDelta = this.y.initialDelta;
322
+ return Math.sqrt(xDelta * xDelta + yDelta * yDelta) <= this.threshold;
323
+ }
324
+ }
325
+
326
+ function withEachUpEvent(callback) {
327
+ const eventMap = getEventMap(navigator.userAgent);
328
+ let downEvents = eventMap.up.split(' '),
329
+ idx = 0,
330
+ length = downEvents.length;
331
+
332
+ for (; idx < length; idx++) {
333
+ callback(downEvents[idx]);
334
+ }
335
+ }
336
+
337
+ export class UserEvents extends Observable {
338
+ constructor(element, options) {
339
+ super();
340
+ let that = this;
341
+ let filter;
342
+
343
+ const support = getSupportedFeatures();
344
+ this.support = support;
345
+
346
+ /* eslint-disable no-param-reassign */
347
+ options = options || {};
348
+ /* eslint-enable no-param-reassign */
349
+
350
+ filter = that.filter = options.filter;
351
+ that.threshold = options.threshold || DEFAULT_THRESHOLD;
352
+ that.minHold = options.minHold || DEFAULT_MIN_HOLD;
353
+ that.touches = [];
354
+ that._maxTouches = options.multiTouch ? 2 : 1;
355
+ that.allowSelection = options.allowSelection;
356
+ that.captureUpIfMoved = options.captureUpIfMoved;
357
+ that.useClickAsTap = !options.fastTap && !support.delayedClick();
358
+ that._clicks = 0;
359
+ that.supportDoubleTap = options.supportDoubleTap;
360
+
361
+ const enableGlobalSurface = !support.touch || support.mouseAndTouchPresent;
362
+
363
+ extend(that, {
364
+ element: element,
365
+ surface: options.global && enableGlobalSurface ?
366
+ element.ownerDocument.documentElement :
367
+ options.surface || element,
368
+ stopPropagation: options.stopPropagation,
369
+ pressed: false
370
+ });
371
+
372
+ this._surfaceMoveHandler = proxy(this._move, this);
373
+ on(that.surface, applyEventMap('move'), this._surfaceMoveHandler);
374
+
375
+ this._surfaceEndHandler = proxy(this._end, this);
376
+ on(that.surface, applyEventMap('up cancel'), this._surfaceEndHandler);
377
+
378
+ this._elementStartHandler = proxy(this._start, this);
379
+ on(element, applyEventMap('down'), filter, this._elementStartHandler);
380
+
381
+ if (that.useClickAsTap) {
382
+ this._elementClickHandler = proxy(this._click, this);
383
+ on(element, applyEventMap('click'), filter, this._elementClickHandler);
384
+ }
385
+
386
+ if (support.pointers || support.msPointers) {
387
+ if (support.browser.version < 11) {
388
+ let defaultAction = 'pinch-zoom double-tap-zoom';
389
+
390
+ element.style['-ms-touch-action'] =
391
+ options.touchAction && options.touchAction !== 'none' ?
392
+ defaultAction + ' ' + options.touchAction :
393
+ defaultAction;
394
+
395
+ } else {
396
+ element.style['touch-action'] = options.touchAction || 'none';
397
+ }
398
+ }
399
+ if (options.preventDragEvent) {
400
+ this._elementDragStartHandler = preventDefault;
401
+ on(element, applyEventMap('dragstart'), this._elementDragStartHandler);
402
+ }
403
+
404
+ // element.on(kendo.applyEventMap('mousedown'), filter, {
405
+ // root: element
406
+ // } '_select');
407
+
408
+ // todo: use root
409
+ this._elementSelectHandler = proxy(this._select, this);
410
+ on(element, applyEventMap('mousedown'), filter, this._elementSelectHandler);
411
+
412
+ if (that.captureUpIfMoved && support.eventCapture) {
413
+ let surfaceElement = that.surface,
414
+ preventIfMovingProxy = proxy(that.preventIfMoving, that);
415
+
416
+ withEachUpEvent(function(eventName) {
417
+ surfaceElement.addEventListener(eventName, preventIfMovingProxy, true);
418
+ });
419
+ }
420
+
421
+ that.bind([
422
+ PRESS,
423
+ HOLD,
424
+ TAP,
425
+ DOUBLETAP,
426
+ START,
427
+ MOVE,
428
+ END,
429
+ RELEASE,
430
+ CANCEL,
431
+ GESTURESTART,
432
+ GESTURECHANGE,
433
+ GESTUREEND,
434
+ GESTURETAP,
435
+ SELECT
436
+ ], options);
437
+ }
438
+
439
+ preventIfMoving(e) {
440
+ if (this._isMoved()) {
441
+ e.preventDefault();
442
+ }
443
+ }
444
+
445
+ destroy() {
446
+ let that = this;
447
+ const options = this.options;
448
+ const element = this.element;
449
+
450
+ if (that._destroyed) {
451
+ return;
452
+ }
453
+
454
+ that._destroyed = true;
455
+
456
+ if (that.captureUpIfMoved && this.support.eventCapture) {
457
+ let surfaceElement = that.surface;
458
+ withEachUpEvent(function(eventName) {
459
+ surfaceElement.removeEventListener(eventName, that.preventIfMoving);
460
+ });
461
+ }
462
+
463
+ off(that.surface, applyEventMap('move'), this._surfaceMoveHandler);
464
+ off(that.surface, applyEventMap('up cancel'), this._surfaceEndHandler);
465
+
466
+ off(element, applyEventMap('down'), this._elementStartHandler);
467
+
468
+ if (that.useClickAsTap) {
469
+ off(element, applyEventMap('click'), this._elementClickHandler);
470
+ }
471
+
472
+ if (options.preventDragEvent) {
473
+ off(element, applyEventMap('dragstart'), this._elementDragStartHandler);
474
+ }
475
+
476
+ off(element, applyEventMap('mousedown'), this._elementSelectHandler);
477
+
478
+ that._disposeAll();
479
+ that.unbind();
480
+
481
+ delete that.surface;
482
+ delete that.element;
483
+ delete that.currentTarget;
484
+ }
485
+
486
+ capture() {
487
+ UserEvents.current = this;
488
+ }
489
+
490
+ cancel() {
491
+ this._disposeAll();
492
+ this.trigger(CANCEL);
493
+ }
494
+
495
+ /* eslint-disable indent */
496
+ notify(event, data) {
497
+ let that = this,
498
+ touches = that.touches;
499
+ let eventName = event;
500
+
501
+ if (this._isMultiTouch()) {
502
+ switch (eventName) {
503
+ case MOVE:
504
+ eventName = GESTURECHANGE;
505
+ break;
506
+ case END:
507
+ eventName = GESTUREEND;
508
+ break;
509
+ case TAP:
510
+ eventName = GESTURETAP;
511
+ break;
512
+ default:
513
+ break;
514
+ }
515
+
516
+ extend(data, {
517
+ touches: touches
518
+ }, touchDelta(touches[0], touches[1]));
519
+ }
520
+
521
+ return this.trigger(eventName, extend(data, {
522
+ type: eventName
523
+ }));
524
+ }
525
+ /* eslint-enable indent */
526
+
527
+ press(x, y, target) {
528
+ this._apiCall('_start', x, y, target);
529
+ }
530
+
531
+ move(x, y) {
532
+ this._apiCall('_move', x, y);
533
+ }
534
+
535
+ end(x, y) {
536
+ this._apiCall('_end', x, y);
537
+ }
538
+
539
+ _isMultiTouch() {
540
+ return this.touches.length > 1;
541
+ }
542
+
543
+ _maxTouchesReached() {
544
+ return this.touches.length >= this._maxTouches;
545
+ }
546
+
547
+ _disposeAll() {
548
+ let touches = this.touches;
549
+ while (touches.length > 0) {
550
+ touches.pop().dispose();
551
+ }
552
+ }
553
+
554
+ _isMoved() {
555
+ return grep(this.touches, function(touch) {
556
+ return touch.isMoved();
557
+ }).length;
558
+ }
559
+
560
+ _select(e) {
561
+ if (!this.allowSelection || this.trigger(SELECT, { event: e })) {
562
+ e.preventDefault();
563
+ }
564
+ }
565
+
566
+ _start(e) {
567
+ let that = this,
568
+ idx = 0,
569
+ filter = that.filter,
570
+ target,
571
+ touches = getTouches(e),
572
+ length = touches.length,
573
+ touch,
574
+ which = e.which;
575
+
576
+ if (which && which > 1 || that._maxTouchesReached()) {
577
+ return;
578
+ }
579
+
580
+ UserEvents.current = null;
581
+ that.currentTarget = e.currentTarget;
582
+
583
+ if (that.stopPropagation) {
584
+ e.stopPropagation();
585
+ }
586
+
587
+ for (; idx < length; idx++) {
588
+ if (that._maxTouchesReached()) {
589
+ break;
590
+ }
591
+
592
+ touch = touches[idx];
593
+
594
+ if (filter) {
595
+ target = touch.currentTarget;
596
+ } else {
597
+ target = that.element;
598
+ }
599
+
600
+ if (target && target.length === 0) {
601
+ continue;
602
+ }
603
+
604
+ touch = new Touch(that, target, touch);
605
+ that.touches.push(touch);
606
+ touch.press();
607
+
608
+ if (that._isMultiTouch()) {
609
+ that.notify('gesturestart', {});
610
+ }
611
+ }
612
+ }
613
+
614
+ _move(e) {
615
+ this._eachTouch('move', e);
616
+ }
617
+
618
+ _end(e) {
619
+ this._eachTouch('end', e);
620
+ }
621
+
622
+ _click(e) {
623
+ let data = {
624
+ touch: {
625
+ initialTouch: e.target,
626
+ target: e.currentTarget,
627
+ endTime: now(),
628
+ x: {
629
+ location: e.pageX,
630
+ client: e.clientX
631
+ },
632
+ y: {
633
+ location: e.pageY,
634
+ client: e.clientY
635
+ }
636
+ },
637
+ x: e.pageX,
638
+ y: e.pageY,
639
+ target: e.currentTarget,
640
+ event: e,
641
+ type: 'tap'
642
+ };
643
+
644
+ if (this.trigger('tap', data)) {
645
+ e.preventDefault();
646
+ }
647
+ }
648
+
649
+ _eachTouch(methodName, e) {
650
+ let that = this,
651
+ dict = {},
652
+ touches = getTouches(e),
653
+ activeTouches = that.touches,
654
+ idx,
655
+ touch,
656
+ touchInfo,
657
+ matchingTouch;
658
+
659
+ for (idx = 0; idx < activeTouches.length; idx++) {
660
+ touch = activeTouches[idx];
661
+ dict[touch.id] = touch;
662
+ }
663
+
664
+ for (idx = 0; idx < touches.length; idx++) {
665
+ touchInfo = touches[idx];
666
+ matchingTouch = dict[touchInfo.id];
667
+
668
+ if (matchingTouch) {
669
+ matchingTouch[methodName](touchInfo);
670
+ }
671
+ }
672
+ }
673
+
674
+ _apiCall(type, x, y, target) {
675
+ this[type]({
676
+ api: true,
677
+ pageX: x,
678
+ pageY: y,
679
+ clientX: x,
680
+ clientY: y,
681
+ target: target || this.element,
682
+ stopPropagation: noop,
683
+ preventDefault: noop
684
+ });
685
+ }
686
+
687
+ static defaultThreshold(value) {
688
+ DEFAULT_THRESHOLD = value;
689
+ }
690
+
691
+ static minHold(value) {
692
+ DEFAULT_MIN_HOLD = value;
693
+ }
694
+ }