@progress/kendo-charts 1.28.0-dev.202303070933 → 1.28.0-dev.202303091324
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/es/stock/constants.js +2 -1
- package/dist/es/stock/navigator.js +11 -3
- package/dist/es2015/map/map.js +9 -4
- package/dist/es2015/map/scroller/scroller.js +2 -2
- package/dist/es2015/stock/constants.js +2 -1
- package/dist/es2015/stock/navigator.js +11 -3
- package/dist/npm/main.js +24 -9
- 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();
|
|
@@ -4,7 +4,7 @@ import { DRAG, DRAG_END, EQUALLY_SPACED_SERIES, ZOOM, ZOOM_END } from '../chart/
|
|
|
4
4
|
import { DateCategoryAxis } from '../core';
|
|
5
5
|
import { addDuration, parseDate, toDate, toTime } from '../date-utils';
|
|
6
6
|
import { Class, deepExtend, defined, getTemplate, InstanceObserver, last, limitValue, valueOrDefault } from '../common';
|
|
7
|
-
import { NAVIGATOR_AXIS, NAVIGATOR_PANE } from './constants';
|
|
7
|
+
import { NAVIGATOR_AXIS, NAVIGATOR_PANE, DEFAULT_PANE } from './constants';
|
|
8
8
|
|
|
9
9
|
var ZOOM_ACCELERATION = 3;
|
|
10
10
|
|
|
@@ -148,7 +148,7 @@ var Navigator = (function (Class) {
|
|
|
148
148
|
Navigator.prototype.redrawSlaves = function redrawSlaves () {
|
|
149
149
|
var chart = this.chart;
|
|
150
150
|
var plotArea = chart._plotArea;
|
|
151
|
-
var slavePanes = plotArea.panes.
|
|
151
|
+
var slavePanes = plotArea.panes.filter(function (pane) { return pane.options.name !== NAVIGATOR_PANE; });
|
|
152
152
|
|
|
153
153
|
// Update the original series and categoryAxis before partial refresh.
|
|
154
154
|
plotArea.srcSeries = chart.options.series;
|
|
@@ -393,7 +393,13 @@ var Navigator = (function (Class) {
|
|
|
393
393
|
paneOptions.height = 0.1;
|
|
394
394
|
}
|
|
395
395
|
|
|
396
|
-
|
|
396
|
+
if (options.navigator.position !== 'top') {
|
|
397
|
+
panes.push(paneOptions);
|
|
398
|
+
} else {
|
|
399
|
+
panes.unshift(paneOptions);
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
panes.forEach(function (pane) { return pane.name = pane.name || DEFAULT_PANE; });
|
|
397
403
|
|
|
398
404
|
Navigator.attachAxes(options, naviOptions);
|
|
399
405
|
Navigator.attachSeries(options, naviOptions, themeOptions);
|
|
@@ -403,6 +409,8 @@ var Navigator = (function (Class) {
|
|
|
403
409
|
var series = naviOptions.series || [];
|
|
404
410
|
var categoryAxes = options.categoryAxis = [].concat(options.categoryAxis);
|
|
405
411
|
var valueAxes = options.valueAxis = [].concat(options.valueAxis);
|
|
412
|
+
var allAxes = categoryAxes.concat(valueAxes);
|
|
413
|
+
allAxes.forEach(function (axis) { return axis.pane = axis.pane || DEFAULT_PANE; });
|
|
406
414
|
|
|
407
415
|
var equallySpacedSeries = filterSeriesByType(series, EQUALLY_SPACED_SERIES);
|
|
408
416
|
var justifyAxis = equallySpacedSeries.length === 0;
|
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();
|
|
@@ -4,7 +4,7 @@ import { DRAG, DRAG_END, EQUALLY_SPACED_SERIES, ZOOM, ZOOM_END } from '../chart/
|
|
|
4
4
|
import { DateCategoryAxis } from '../core';
|
|
5
5
|
import { addDuration, parseDate, toDate, toTime } from '../date-utils';
|
|
6
6
|
import { Class, deepExtend, defined, getTemplate, InstanceObserver, last, limitValue, valueOrDefault } from '../common';
|
|
7
|
-
import { NAVIGATOR_AXIS, NAVIGATOR_PANE } from './constants';
|
|
7
|
+
import { NAVIGATOR_AXIS, NAVIGATOR_PANE, DEFAULT_PANE } from './constants';
|
|
8
8
|
|
|
9
9
|
const ZOOM_ACCELERATION = 3;
|
|
10
10
|
|
|
@@ -138,7 +138,7 @@ class Navigator extends Class {
|
|
|
138
138
|
redrawSlaves() {
|
|
139
139
|
const chart = this.chart;
|
|
140
140
|
const plotArea = chart._plotArea;
|
|
141
|
-
const slavePanes = plotArea.panes.
|
|
141
|
+
const slavePanes = plotArea.panes.filter(pane => pane.options.name !== NAVIGATOR_PANE);
|
|
142
142
|
|
|
143
143
|
// Update the original series and categoryAxis before partial refresh.
|
|
144
144
|
plotArea.srcSeries = chart.options.series;
|
|
@@ -364,7 +364,13 @@ class Navigator extends Class {
|
|
|
364
364
|
paneOptions.height = 0.1;
|
|
365
365
|
}
|
|
366
366
|
|
|
367
|
-
|
|
367
|
+
if (options.navigator.position !== 'top') {
|
|
368
|
+
panes.push(paneOptions);
|
|
369
|
+
} else {
|
|
370
|
+
panes.unshift(paneOptions);
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
panes.forEach(pane => pane.name = pane.name || DEFAULT_PANE);
|
|
368
374
|
|
|
369
375
|
Navigator.attachAxes(options, naviOptions);
|
|
370
376
|
Navigator.attachSeries(options, naviOptions, themeOptions);
|
|
@@ -374,6 +380,8 @@ class Navigator extends Class {
|
|
|
374
380
|
const series = naviOptions.series || [];
|
|
375
381
|
const categoryAxes = options.categoryAxis = [].concat(options.categoryAxis);
|
|
376
382
|
const valueAxes = options.valueAxis = [].concat(options.valueAxis);
|
|
383
|
+
const allAxes = categoryAxes.concat(valueAxes);
|
|
384
|
+
allAxes.forEach(axis => axis.pane = axis.pane || DEFAULT_PANE);
|
|
377
385
|
|
|
378
386
|
const equallySpacedSeries = filterSeriesByType(series, EQUALLY_SPACED_SERIES);
|
|
379
387
|
const justifyAxis = equallySpacedSeries.length === 0;
|