@progress/kendo-charts 1.28.0-dev.202303070933 → 1.28.0-dev.202303091129
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/dist/cdn/js/kendo-charts.js +1 -1
- package/dist/cdn/main.js +1 -1
- package/dist/es/map/map.js +9 -4
- package/dist/es/map/scroller/scroller.js +2 -2
- package/dist/es2015/map/map.js +9 -4
- package/dist/es2015/map/scroller/scroller.js +2 -2
- package/dist/npm/main.js +10 -6
- package/dist/systemjs/kendo-charts.js +1 -1
- package/package.json +1 -1
package/dist/es/map/map.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
|
-
geometry as g
|
|
2
|
+
geometry as g,
|
|
3
|
+
throttle
|
|
3
4
|
} from '@progress/kendo-drawing';
|
|
4
5
|
|
|
5
6
|
import {
|
|
@@ -89,7 +90,8 @@ var math = Math,
|
|
|
89
90
|
LOCATION = "location",
|
|
90
91
|
FRICTION = 0.9,
|
|
91
92
|
FRICTION_MOBILE = 0.93,
|
|
92
|
-
MOUSEWHEEL = '
|
|
93
|
+
MOUSEWHEEL = 'wheel',
|
|
94
|
+
MOUSEWHEEL_THROTTLE = 50,
|
|
93
95
|
VELOCITY_MULTIPLIER = 5,
|
|
94
96
|
DEFAULT_ZOOM_RATE = 1;
|
|
95
97
|
|
|
@@ -178,7 +180,11 @@ var Map = (function (Observable) {
|
|
|
178
180
|
this._initLayers();
|
|
179
181
|
this._reset();
|
|
180
182
|
|
|
181
|
-
|
|
183
|
+
var mousewheelThrottled = throttle(this._mousewheel.bind(this), MOUSEWHEEL_THROTTLE);
|
|
184
|
+
this._mousewheelHandler = function (e) {
|
|
185
|
+
e.preventDefault();
|
|
186
|
+
mousewheelThrottled(e);
|
|
187
|
+
};
|
|
182
188
|
on(this.element, MOUSEWHEEL, this._mousewheelHandler);
|
|
183
189
|
};
|
|
184
190
|
|
|
@@ -851,7 +857,6 @@ var Map = (function (Observable) {
|
|
|
851
857
|
};
|
|
852
858
|
|
|
853
859
|
Map.prototype._mousewheel = function _mousewheel (e) {
|
|
854
|
-
e.preventDefault();
|
|
855
860
|
var delta = mousewheelDelta(e) > 0 ? -1 : 1;
|
|
856
861
|
var options = this.options;
|
|
857
862
|
var fromZoom = this.zoom();
|
|
@@ -438,7 +438,7 @@ export var Scroller = (function (Observable) {
|
|
|
438
438
|
|
|
439
439
|
if (that.options.mousewheelScrolling) {
|
|
440
440
|
this._wheelScrollHandler = this._wheelScroll.bind(this);
|
|
441
|
-
on(element, '
|
|
441
|
+
on(element, 'wheel', this._wheelScrollHandler);
|
|
442
442
|
}
|
|
443
443
|
|
|
444
444
|
extend(that, {
|
|
@@ -622,7 +622,7 @@ export var Scroller = (function (Observable) {
|
|
|
622
622
|
Scroller.prototype.destroy = function destroy () {
|
|
623
623
|
var element = this.element;
|
|
624
624
|
|
|
625
|
-
off(element, '
|
|
625
|
+
off(element, 'wheel', this._wheelScrollHandler);
|
|
626
626
|
|
|
627
627
|
if (this.userEvents) {
|
|
628
628
|
this.userEvents.destroy();
|
package/dist/es2015/map/map.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
|
-
geometry as g
|
|
2
|
+
geometry as g,
|
|
3
|
+
throttle
|
|
3
4
|
} from '@progress/kendo-drawing';
|
|
4
5
|
|
|
5
6
|
import {
|
|
@@ -89,7 +90,8 @@ let math = Math,
|
|
|
89
90
|
LOCATION = "location",
|
|
90
91
|
FRICTION = 0.9,
|
|
91
92
|
FRICTION_MOBILE = 0.93,
|
|
92
|
-
MOUSEWHEEL = '
|
|
93
|
+
MOUSEWHEEL = 'wheel',
|
|
94
|
+
MOUSEWHEEL_THROTTLE = 50,
|
|
93
95
|
VELOCITY_MULTIPLIER = 5,
|
|
94
96
|
DEFAULT_ZOOM_RATE = 1;
|
|
95
97
|
|
|
@@ -164,7 +166,11 @@ class Map extends Observable {
|
|
|
164
166
|
this._initLayers();
|
|
165
167
|
this._reset();
|
|
166
168
|
|
|
167
|
-
|
|
169
|
+
const mousewheelThrottled = throttle(this._mousewheel.bind(this), MOUSEWHEEL_THROTTLE);
|
|
170
|
+
this._mousewheelHandler = (e) => {
|
|
171
|
+
e.preventDefault();
|
|
172
|
+
mousewheelThrottled(e);
|
|
173
|
+
};
|
|
168
174
|
on(this.element, MOUSEWHEEL, this._mousewheelHandler);
|
|
169
175
|
}
|
|
170
176
|
|
|
@@ -823,7 +829,6 @@ class Map extends Observable {
|
|
|
823
829
|
}
|
|
824
830
|
|
|
825
831
|
_mousewheel(e) {
|
|
826
|
-
e.preventDefault();
|
|
827
832
|
let delta = mousewheelDelta(e) > 0 ? -1 : 1;
|
|
828
833
|
let options = this.options;
|
|
829
834
|
let fromZoom = this.zoom();
|
|
@@ -414,7 +414,7 @@ export class Scroller extends Observable {
|
|
|
414
414
|
|
|
415
415
|
if (that.options.mousewheelScrolling) {
|
|
416
416
|
this._wheelScrollHandler = this._wheelScroll.bind(this);
|
|
417
|
-
on(element, '
|
|
417
|
+
on(element, 'wheel', this._wheelScrollHandler);
|
|
418
418
|
}
|
|
419
419
|
|
|
420
420
|
extend(that, {
|
|
@@ -594,7 +594,7 @@ export class Scroller extends Observable {
|
|
|
594
594
|
destroy() {
|
|
595
595
|
const element = this.element;
|
|
596
596
|
|
|
597
|
-
off(element, '
|
|
597
|
+
off(element, 'wheel', this._wheelScrollHandler);
|
|
598
598
|
|
|
599
599
|
if (this.userEvents) {
|
|
600
600
|
this.userEvents.destroy();
|