@progress/kendo-charts 2.4.0-dev.202405211537 → 2.4.0-dev.202406100726

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 (52) hide show
  1. package/dist/cdn/js/kendo-charts.js +1 -1
  2. package/dist/cdn/main.js +1 -1
  3. package/dist/es/chart/legend/legend-layout.js +4 -2
  4. package/dist/es/common/event-map.js +17 -0
  5. package/dist/es/common/event-utils.js +61 -0
  6. package/dist/es/common/get-supported-features.js +55 -0
  7. package/dist/es/common/noop.js +1 -0
  8. package/dist/es/common/now.js +3 -0
  9. package/dist/es/common/observable.js +1 -3
  10. package/dist/es/{map/scroller → common}/user-events.js +43 -131
  11. package/dist/es/common.js +7 -0
  12. package/dist/es/map/layers/layer.js +2 -5
  13. package/dist/es/map/layers/marker.js +3 -3
  14. package/dist/es/map/map.js +6 -6
  15. package/dist/es/map/navigator.js +3 -3
  16. package/dist/es/map/scroller/draggable.js +6 -11
  17. package/dist/es/map/scroller/fx.js +2 -2
  18. package/dist/es/map/scroller/scroller.js +7 -12
  19. package/dist/es/map/utils.js +9 -339
  20. package/dist/es/map/zoom.js +3 -3
  21. package/dist/es/sankey/label.js +21 -7
  22. package/dist/es/sankey/legend.js +16 -4
  23. package/dist/es/sankey/link.js +11 -4
  24. package/dist/es/sankey/sankey.js +67 -15
  25. package/dist/es/services/dom-events-builder.js +2 -4
  26. package/dist/es2015/chart/legend/legend-layout.js +4 -2
  27. package/dist/es2015/common/event-map.js +17 -0
  28. package/dist/es2015/common/event-utils.js +61 -0
  29. package/dist/es2015/common/get-supported-features.js +55 -0
  30. package/dist/es2015/common/noop.js +1 -0
  31. package/dist/es2015/common/now.js +3 -0
  32. package/dist/es2015/common/observable.js +1 -3
  33. package/dist/es2015/{map/scroller → common}/user-events.js +39 -131
  34. package/dist/es2015/common.js +7 -0
  35. package/dist/es2015/map/layers/layer.js +2 -5
  36. package/dist/es2015/map/layers/marker.js +3 -3
  37. package/dist/es2015/map/map.js +6 -6
  38. package/dist/es2015/map/navigator.js +3 -3
  39. package/dist/es2015/map/scroller/draggable.js +6 -11
  40. package/dist/es2015/map/scroller/fx.js +2 -2
  41. package/dist/es2015/map/scroller/scroller.js +7 -12
  42. package/dist/es2015/map/utils.js +8 -339
  43. package/dist/es2015/map/zoom.js +3 -3
  44. package/dist/es2015/sankey/label.js +19 -6
  45. package/dist/es2015/sankey/legend.js +15 -5
  46. package/dist/es2015/sankey/link.js +9 -4
  47. package/dist/es2015/sankey/sankey.js +66 -17
  48. package/dist/es2015/services/dom-events-builder.js +2 -4
  49. package/dist/npm/main.js +2795 -2975
  50. package/dist/npm/sankey.d.ts +4 -0
  51. package/dist/systemjs/kendo-charts.js +1 -1
  52. package/package.json +1 -1
@@ -1,7 +1,9 @@
1
1
  import { drawing as draw } from '@progress/kendo-drawing';
2
2
 
3
3
  import { ChartElement, Box, rectToBox } from '../../core';
4
- import { CENTER, HORIZONTAL, START, VERTICAL } from '../../common/constants';
4
+ import { CENTER, HORIZONTAL, START, END, VERTICAL } from '../../common/constants';
5
+
6
+ var alignItems = function (rtl) { return (rtl ? END : START); };
5
7
 
6
8
  var LegendLayout = (function (ChartElement) {
7
9
  function LegendLayout(options, chartService) {
@@ -25,7 +27,7 @@ var LegendLayout = (function (ChartElement) {
25
27
  lineSpacing: vertical ? options.spacing : 0,
26
28
  orientation: vertical ? VERTICAL : HORIZONTAL,
27
29
  reverse: options.rtl,
28
- alignItems: vertical ? START : CENTER
30
+ alignItems: vertical ? alignItems(options.rtl) : CENTER
29
31
  });
30
32
 
31
33
  for (var idx = 0; idx < children.length; idx++) {
@@ -0,0 +1,17 @@
1
+ export var eventMap = {
2
+ down: "pointerdown",
3
+ move: "pointermove",
4
+ up: "pointerup",
5
+ cancel: "pointercancel pointerleave"
6
+ };
7
+
8
+ function queryEventMap(e) {
9
+ return eventMap[e] || e;
10
+ }
11
+
12
+ export var applyEventMap = function (events) {
13
+ var eventRegEx = /([^ ]+)/g;
14
+ var appliedEvents = events.replace(eventRegEx, queryEventMap);
15
+
16
+ return appliedEvents;
17
+ };
@@ -0,0 +1,61 @@
1
+ import isFunction from './is-function';
2
+ import isArray from './is-array';
3
+
4
+ export function on(element, events, filter, handler, useCapture) {
5
+ addEventListeners(element, events, filter, handler, useCapture);
6
+ }
7
+
8
+ export function off(element, events, filter, handler, useCapture) {
9
+ removeEventListeners(element, events, filter, handler, useCapture);
10
+ }
11
+
12
+ function isString(value) {
13
+ return typeof(value) === "string";
14
+ }
15
+
16
+ function addEventListeners(element, events, filter, handler, useCapture) {
17
+ var eventNames = isArray(events) ? events : (events || "").split(" ");
18
+
19
+ eventNames.forEach(function(eventName) {
20
+ addEventListener(element, eventName, filter, handler, useCapture);
21
+ });
22
+ }
23
+
24
+ function addEventListener(element, event, filter, handler, useCapture) {
25
+ var eventHandler = handler;
26
+ var eventFilter;
27
+
28
+ if (filter && isFunction(filter) && !handler) {
29
+ eventHandler = filter;
30
+ } else if (filter && isString(filter) && isFunction(eventHandler)) {
31
+ eventFilter = filter;
32
+ }
33
+
34
+ element.addEventListener(event, function(e) {
35
+ var closestMatchingTarget = e.target ? e.target.closest(eventFilter) : null;
36
+
37
+ if (!eventFilter ||
38
+ (eventFilter && e.target && closestMatchingTarget)) {
39
+ var currentTarget = eventFilter ? closestMatchingTarget : e.currentTarget;
40
+
41
+ // reassign the property as it is a getters only
42
+ Object.defineProperty(e, "currentTarget", { value: currentTarget });
43
+ // keep a reference to the top-level target
44
+ Object.defineProperty(e, "delegateTarget", { value: element });
45
+
46
+ eventHandler(e);
47
+ }
48
+ }, Boolean(useCapture));
49
+ }
50
+
51
+ function removeEventListeners(element, events, handler, useCapture) {
52
+ var eventNames = isArray(events) ? events : (events || "").split(" ");
53
+
54
+ eventNames.forEach(function(eventName) {
55
+ removeEventListener(element, eventName, handler, useCapture);
56
+ });
57
+ }
58
+
59
+ function removeEventListener(element, event, handler, useCapture) {
60
+ element.removeEventListener(event, handler, Boolean(useCapture));
61
+ }
@@ -0,0 +1,55 @@
1
+ export default function getSupportedFeatures() {
2
+ var os = detectOS(navigator.userAgent);
3
+ var support = {};
4
+
5
+ support.mobileOS = os;
6
+
7
+ return support;
8
+ }
9
+
10
+ function detectOS(ua) {
11
+ var os = false;
12
+ var agentRxs = {
13
+ wp: /(Windows Phone(?: OS)?)\s(\d+)\.(\d+(\.\d+)?)/,
14
+ fire: /(Silk)\/(\d+)\.(\d+(\.\d+)?)/,
15
+ android: /(Android|Android.*(?:Opera|Firefox).*?\/)\s*(\d+)\.?(\d+(\.\d+)?)?/,
16
+ iphone: /(iPhone|iPod).*OS\s+(\d+)[\._]([\d\._]+)/,
17
+ ipad: /(iPad).*OS\s+(\d+)[\._]([\d_]+)/,
18
+ playbook: /(PlayBook).*?Tablet\s*OS\s*(\d+)\.(\d+(\.\d+)?)/,
19
+ windows: /(MSIE)\s+(\d+)\.(\d+(\.\d+)?)/,
20
+ tizen: /(tizen).*?Version\/(\d+)\.(\d+(\.\d+)?)/i,
21
+ sailfish: /(sailfish).*rv:(\d+)\.(\d+(\.\d+)?).*firefox/i
22
+ },
23
+ osRxs = {
24
+ ios: /^i(phone|pad|pod)$/i,
25
+ android: /^android|fire$/i,
26
+ windows: /windows/,
27
+ wp: /wp/,
28
+ flat: /sailfish|ffos|tizen/i
29
+ };
30
+
31
+ for (var agent in agentRxs) {
32
+ var match = ua.match(agentRxs[agent]);
33
+ if (match) {
34
+ if (agent === "windows" && "plugins" in navigator) { return false; } // Break if not Metro/Mobile Windows
35
+
36
+ os = {};
37
+ os.device = agent;
38
+ os.name = testRegex(agent, osRxs);
39
+ os[os.name] = true;
40
+
41
+ break;
42
+ }
43
+ }
44
+
45
+ return os;
46
+ }
47
+
48
+ function testRegex(agent, regexes, dflt) {
49
+ for (var regex in regexes) {
50
+ if (regexes[regex].test(agent)) {
51
+ return regex;
52
+ }
53
+ }
54
+ return dflt !== undefined ? dflt : agent;
55
+ }
@@ -0,0 +1 @@
1
+ export default function noop() {}
@@ -0,0 +1,3 @@
1
+ export default function now() {
2
+ return new Date().getTime();
3
+ }
@@ -1,6 +1,4 @@
1
- import {
2
- Class
3
- } from '../common';
1
+ import { Class } from '../drawing-utils';
4
2
 
5
3
  var STRING = "string";
6
4
  var FUNCTION = "function";
@@ -1,19 +1,11 @@
1
- import {
2
- Class,
3
- Observable,
4
- grep
5
- } from '../../common';
6
-
7
- import {
8
- proxy,
9
- noop,
10
- applyEventMap,
11
- getEventMap,
12
- on,
13
- off,
14
- now,
15
- getSupportedFeatures
16
- } from '../utils';
1
+ import { Class } from '../drawing-utils';
2
+ import { applyEventMap, eventMap } from './event-map';
3
+ import { on, off } from './event-utils';
4
+ import getSupportedFeatures from './get-supported-features';
5
+ import noop from './noop';
6
+ import now from './now';
7
+ import grep from './grep';
8
+ import Observable from './observable';
17
9
 
18
10
  var extend = Object.assign;
19
11
 
@@ -24,7 +16,6 @@ var preventDefault = function (e) {
24
16
  var
25
17
  DEFAULT_MIN_HOLD = 800,
26
18
  CLICK_DELAY = 300,
27
- // DEFAULT_THRESHOLD = support.browser.msie ? 5 : 0,
28
19
  DEFAULT_THRESHOLD = 0,
29
20
  PRESS = 'press',
30
21
  HOLD = 'hold',
@@ -66,37 +57,20 @@ function touchDelta(touch1, touch2) {
66
57
  }
67
58
 
68
59
  function getTouches(e) {
69
- var support = getSupportedFeatures();
70
60
  var touches = [],
71
61
  originalEvent = e.originalEvent || e,
72
- currentTarget = e.currentTarget,
73
- idx = 0,
74
- length, changedTouches, touch;
62
+ currentTarget = e.currentTarget;
75
63
 
76
64
  if (e.api) {
77
65
  touches.push({
78
- id: 2,
66
+ id: 2, // hardcoded ID for API call
79
67
  event: e,
80
68
  target: e.target,
81
69
  currentTarget: e.target,
82
70
  location: e,
83
71
  type: 'api'
84
72
  });
85
- } else if (e.type.match(/touch/)) {
86
- changedTouches = originalEvent ? originalEvent.changedTouches : [];
87
-
88
- for (length = changedTouches.length; idx < length; idx++) {
89
- touch = changedTouches[idx];
90
- touches.push({
91
- location: touch,
92
- event: e,
93
- target: touch.target,
94
- currentTarget: currentTarget,
95
- id: touch.identifier,
96
- type: 'touch'
97
- });
98
- }
99
- } else if (support.pointers || support.msPointers) {
73
+ } else {
100
74
  touches.push({
101
75
  location: originalEvent,
102
76
  event: e,
@@ -105,20 +79,11 @@ function getTouches(e) {
105
79
  id: originalEvent.pointerId,
106
80
  type: 'pointer'
107
81
  });
108
- } else {
109
- touches.push({
110
- id: 1,
111
- event: e,
112
- target: e.target,
113
- currentTarget: currentTarget,
114
- location: e,
115
- type: 'mouse'
116
- });
117
82
  }
118
83
 
119
84
  return touches;
120
85
  }
121
- export var TouchAxis = (function (Class) {
86
+ var TouchAxis = (function (Class) {
122
87
  function TouchAxis(axis, location) {
123
88
  Class.call(this);
124
89
  var that = this;
@@ -165,7 +130,7 @@ export var TouchAxis = (function (Class) {
165
130
  return TouchAxis;
166
131
  }(Class));
167
132
 
168
- export var Touch = (function (Class) {
133
+ var Touch = (function (Class) {
169
134
  function Touch(userEvents, target, touchInfo) {
170
135
  Class.call(this);
171
136
 
@@ -173,7 +138,6 @@ export var Touch = (function (Class) {
173
138
  x: new TouchAxis('X', touchInfo.location),
174
139
  y: new TouchAxis('Y', touchInfo.location),
175
140
  type: touchInfo.type,
176
- useClickAsTap: userEvents.useClickAsTap,
177
141
  threshold: userEvents.threshold || THRESHOLD[touchInfo.type],
178
142
  userEvents: userEvents,
179
143
  target: target,
@@ -193,8 +157,9 @@ export var Touch = (function (Class) {
193
157
  Touch.prototype.constructor = Touch;
194
158
 
195
159
  Touch.prototype.press = function press () {
196
- // this._holdTimeout = setTimeout($.proxy(this, '_hold'), this.userEvents.minHold);
197
- this._holdTimeout = setTimeout(proxy(this._hold, this), this.userEvents.minHold);
160
+ var this$1 = this;
161
+
162
+ this._holdTimeout = setTimeout(function () { return this$1._hold(); }, this.userEvents.minHold);
198
163
  this._trigger(PRESS, this.pressEvent);
199
164
  };
200
165
 
@@ -263,12 +228,10 @@ export var Touch = (function (Class) {
263
228
  if (this._moved) {
264
229
  this._trigger(END, touchInfo);
265
230
  } else {
266
- if (!this.useClickAsTap) {
267
- if (this.supportDoubleTap) {
268
- this._tap(touchInfo);
269
- } else {
270
- this._trigger(TAP, touchInfo);
271
- }
231
+ if (this.supportDoubleTap) {
232
+ this._tap(touchInfo);
233
+ } else {
234
+ this._trigger(TAP, touchInfo);
272
235
  }
273
236
  }
274
237
 
@@ -309,17 +272,17 @@ export var Touch = (function (Class) {
309
272
  };
310
273
 
311
274
  Touch.prototype._trigger = function _trigger (name, touchInfo) {
312
- var that = this,
313
- jQueryEvent = touchInfo.event,
314
- data = {
315
- touch: that,
316
- x: that.x,
317
- y: that.y,
318
- target: that.target,
319
- event: jQueryEvent
320
- };
321
- if (that.userEvents.notify(name, data)) {
322
- jQueryEvent.preventDefault();
275
+ var e = touchInfo.event;
276
+ var data = {
277
+ touch: this,
278
+ x: this.x,
279
+ y: this.y,
280
+ target: this.target,
281
+ event: e
282
+ };
283
+
284
+ if (this.userEvents.notify(name, data)) {
285
+ e.preventDefault();
323
286
  }
324
287
  };
325
288
 
@@ -333,7 +296,6 @@ export var Touch = (function (Class) {
333
296
  }(Class));
334
297
 
335
298
  function withEachUpEvent(callback) {
336
- var eventMap = getEventMap(navigator.userAgent);
337
299
  var downEvents = eventMap.up.split(' '),
338
300
  idx = 0,
339
301
  length = downEvents.length;
@@ -343,7 +305,7 @@ function withEachUpEvent(callback) {
343
305
  }
344
306
  }
345
307
 
346
- export var UserEvents = (function (Observable) {
308
+ var UserEvents = (function (Observable) {
347
309
  function UserEvents(element, options) {
348
310
  Observable.call(this);
349
311
  var that = this;
@@ -364,48 +326,27 @@ export var UserEvents = (function (Observable) {
364
326
  that._maxTouches = options.multiTouch ? 2 : 1;
365
327
  that.allowSelection = options.allowSelection;
366
328
  that.captureUpIfMoved = options.captureUpIfMoved;
367
- that.useClickAsTap = !options.fastTap && !support.delayedClick();
368
329
  that._clicks = 0;
369
330
  that.supportDoubleTap = options.supportDoubleTap;
370
331
 
371
- var enableGlobalSurface = !support.touch || support.mouseAndTouchPresent;
372
-
373
332
  extend(that, {
374
333
  element: element,
375
- surface: options.global && enableGlobalSurface ?
376
- element.ownerDocument.documentElement :
377
- options.surface || element,
334
+ surface: options.surface || element,
378
335
  stopPropagation: options.stopPropagation,
379
336
  pressed: false
380
337
  });
381
338
 
382
- this._surfaceMoveHandler = proxy(this._move, this);
339
+ this._surfaceMoveHandler = this._move.bind(this);
383
340
  on(that.surface, applyEventMap('move'), this._surfaceMoveHandler);
384
341
 
385
- this._surfaceEndHandler = proxy(this._end, this);
342
+ this._surfaceEndHandler = this._end.bind(this);
386
343
  on(that.surface, applyEventMap('up cancel'), this._surfaceEndHandler);
387
344
 
388
- this._elementStartHandler = proxy(this._start, this);
345
+ this._elementStartHandler = this._start.bind(this);
389
346
  on(element, applyEventMap('down'), filter, this._elementStartHandler);
390
347
 
391
- if (that.useClickAsTap) {
392
- this._elementClickHandler = proxy(this._click, this);
393
- on(element, applyEventMap('click'), filter, this._elementClickHandler);
394
- }
395
-
396
- if (support.pointers || support.msPointers) {
397
- if (support.browser.version < 11) {
398
- var defaultAction = 'pinch-zoom double-tap-zoom';
348
+ element.style['touch-action'] = options.touchAction || 'none';
399
349
 
400
- element.style['-ms-touch-action'] =
401
- options.touchAction && options.touchAction !== 'none' ?
402
- defaultAction + ' ' + options.touchAction :
403
- defaultAction;
404
-
405
- } else {
406
- element.style['touch-action'] = options.touchAction || 'none';
407
- }
408
- }
409
350
  if (options.preventDragEvent) {
410
351
  this._elementDragStartHandler = preventDefault;
411
352
  on(element, applyEventMap('dragstart'), this._elementDragStartHandler);
@@ -416,12 +357,12 @@ export var UserEvents = (function (Observable) {
416
357
  // } '_select');
417
358
 
418
359
  // todo: use root
419
- this._elementSelectHandler = proxy(this._select, this);
360
+ this._elementSelectHandler = this._select.bind(this);
420
361
  on(element, applyEventMap('mousedown'), filter, this._elementSelectHandler);
421
362
 
422
- if (that.captureUpIfMoved && support.eventCapture) {
363
+ if (that.captureUpIfMoved) {
423
364
  var surfaceElement = that.surface,
424
- preventIfMovingProxy = proxy(that.preventIfMoving, that);
365
+ preventIfMovingProxy = that.preventIfMoving.bind(that);
425
366
 
426
367
  withEachUpEvent(function(eventName) {
427
368
  surfaceElement.addEventListener(eventName, preventIfMovingProxy, true);
@@ -467,7 +408,7 @@ export var UserEvents = (function (Observable) {
467
408
 
468
409
  that._destroyed = true;
469
410
 
470
- if (that.captureUpIfMoved && this.support.eventCapture) {
411
+ if (that.captureUpIfMoved) {
471
412
  var surfaceElement = that.surface;
472
413
  withEachUpEvent(function(eventName) {
473
414
  surfaceElement.removeEventListener(eventName, that.preventIfMoving);
@@ -479,10 +420,6 @@ export var UserEvents = (function (Observable) {
479
420
 
480
421
  off(element, applyEventMap('down'), this._elementStartHandler);
481
422
 
482
- if (that.useClickAsTap) {
483
- off(element, applyEventMap('click'), this._elementClickHandler);
484
- }
485
-
486
423
  if (options.preventDragEvent) {
487
424
  off(element, applyEventMap('dragstart'), this._elementDragStartHandler);
488
425
  }
@@ -631,33 +568,6 @@ export var UserEvents = (function (Observable) {
631
568
  this._eachTouch('end', e);
632
569
  };
633
570
 
634
- UserEvents.prototype._click = function _click (e) {
635
- var data = {
636
- touch: {
637
- initialTouch: e.target,
638
- target: e.currentTarget,
639
- endTime: now(),
640
- x: {
641
- location: e.pageX,
642
- client: e.clientX
643
- },
644
- y: {
645
- location: e.pageY,
646
- client: e.clientY
647
- }
648
- },
649
- x: e.pageX,
650
- y: e.pageY,
651
- target: e.currentTarget,
652
- event: e,
653
- type: 'tap'
654
- };
655
-
656
- if (this.trigger('tap', data)) {
657
- e.preventDefault();
658
- }
659
- };
660
-
661
571
  UserEvents.prototype._eachTouch = function _eachTouch (methodName, e) {
662
572
  var that = this,
663
573
  dict = {},
@@ -706,3 +616,5 @@ export var UserEvents = (function (Observable) {
706
616
 
707
617
  return UserEvents;
708
618
  }(Observable));
619
+
620
+ export default UserEvents;
package/dist/es/common.js CHANGED
@@ -40,5 +40,12 @@ export { default as keys } from './common/keys';
40
40
  export { default as hasOwnProperty } from './common/has-own-property';
41
41
  export { default as Matrix } from './common/matrix';
42
42
 
43
+ export { default as UserEvents } from './common/user-events';
44
+ export { default as noop } from './common/noop';
45
+ export { default as now } from './common/now';
46
+ export { default as getSupportedFeatures } from './common/get-supported-features';
47
+ export * from './common/event-map';
48
+ export * from './common/event-utils';
49
+
43
50
  export * from './drawing-utils';
44
51
  export { default as Observable } from './common/observable';
@@ -2,17 +2,14 @@ import {
2
2
  Class,
3
3
  addClass,
4
4
  deepExtend,
5
- defined
5
+ defined,
6
+ getSupportedFeatures
6
7
  } from '../../common';
7
8
 
8
9
  import {
9
10
  Extent
10
11
  } from './../extent';
11
12
 
12
- import {
13
- getSupportedFeatures
14
- } from '../utils';
15
-
16
13
  export var Layer = (function (Class) {
17
14
  function Layer(map, options) {
18
15
  Class.call(this);
@@ -5,15 +5,15 @@ import {
5
5
  getter,
6
6
  deepExtend,
7
7
  setDefaultOptions,
8
- renderIcon
8
+ renderIcon,
9
+ on,
10
+ off,
9
11
  } from '../../common';
10
12
 
11
13
  import { Layer } from './layer';
12
14
  import { Location } from '../location';
13
15
  import {
14
16
  proxy,
15
- on,
16
- off,
17
17
  toHyphens,
18
18
  toPixels,
19
19
  convertToHtml
@@ -14,7 +14,11 @@ import {
14
14
  deepExtend,
15
15
  elementOffset,
16
16
  isArray,
17
- round
17
+ round,
18
+ now,
19
+ on,
20
+ off,
21
+ getSupportedFeatures,
18
22
  } from '../common';
19
23
 
20
24
  import {
@@ -61,12 +65,8 @@ import {
61
65
 
62
66
  import {
63
67
  removeChildren,
64
- setDefaultEvents,
65
68
  proxy,
66
- now,
67
- on,
68
- off,
69
- getSupportedFeatures,
69
+ setDefaultEvents,
70
70
  convertToHtml,
71
71
  renderPos
72
72
  } from './utils';
@@ -4,13 +4,13 @@ import {
4
4
  Observable,
5
5
  keys,
6
6
  setDefaultOptions,
7
- renderIcon
7
+ renderIcon,
8
+ on,
9
+ off,
8
10
  } from '../common';
9
11
 
10
12
  import {
11
13
  proxy,
12
- on,
13
- off,
14
14
  setDefaultEvents,
15
15
  convertToHtml
16
16
  } from './utils';
@@ -1,13 +1,12 @@
1
1
  import {
2
2
  Class,
3
3
  Observable,
4
- elementOffset
4
+ elementOffset,
5
+ eventMap
5
6
  } from '../../common';
6
7
 
7
8
  import {
8
- getEventMap,
9
- proxy,
10
- getSupportedFeatures
9
+ proxy
11
10
  } from '../utils';
12
11
 
13
12
  var extend = Object.assign;
@@ -22,8 +21,6 @@ export var TapCapture = (function (Observable) {
22
21
 
23
22
  that.capture = false;
24
23
 
25
- var eventMap = getEventMap(navigator.userAgent);
26
-
27
24
  if (domElement.addEventListener) {
28
25
  eventMap.down.split(' ').forEach(function(event) {
29
26
  domElement.addEventListener(event, proxy(that._press, that), true);
@@ -373,16 +370,14 @@ export var Movable = (function (Observable) {
373
370
 
374
371
  var that = this;
375
372
 
376
- that.support = getSupportedFeatures();
377
- this.transformStyle = this.support.transitions.prefix + 'Transform';
378
373
  that.element = element;
379
- that.element.style.webkitTransformOrigin = 'left top';
374
+ that.element.style.transformOrigin = 'left top';
380
375
  that.x = 0;
381
376
  that.y = 0;
382
377
  that.scale = 1;
383
378
 
384
379
  var coordinates = translate(that.x, that.y, that.scale);
385
- that.element.style[this.transformStyle] = coordinates;
380
+ that.element.style.transform = coordinates;
386
381
 
387
382
  that._saveCoordinates(coordinates);
388
383
  }
@@ -436,7 +431,7 @@ export var Movable = (function (Observable) {
436
431
  newCoordinates = translate(x, y, that.scale);
437
432
 
438
433
  if (newCoordinates !== that.coordinates) {
439
- that.element.style[this.transformStyle] = newCoordinates;
434
+ that.element.style.transform = newCoordinates;
440
435
 
441
436
  that._saveCoordinates(newCoordinates);
442
437
  that.trigger(CHANGE);
@@ -1,10 +1,10 @@
1
1
  import {
2
- Class
2
+ Class,
3
+ now
3
4
  } from '../../common';
4
5
 
5
6
  import {
6
7
  proxy,
7
- now
8
8
  } from '../utils';
9
9
 
10
10
  var extend = Object.assign;