@progress/kendo-charts 1.24.0 → 1.24.1-dev.202207281230
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/constants.js +3 -0
- package/dist/es/map/map.js +14 -2
- package/dist/es2015/map/constants.js +3 -0
- package/dist/es2015/map/map.js +14 -2
- package/dist/npm/main.js +16 -3
- package/dist/npm/map.d.ts +26 -8
- package/dist/systemjs/kendo-charts.js +1 -1
- package/package.json +1 -1
package/dist/es/map/constants.js
CHANGED
package/dist/es/map/map.js
CHANGED
|
@@ -79,6 +79,8 @@ import {
|
|
|
79
79
|
|
|
80
80
|
import MapService from './../services/map-service';
|
|
81
81
|
|
|
82
|
+
import { CENTER_CHANGE, INIT, ZOOM_CHANGE } from './constants';
|
|
83
|
+
|
|
82
84
|
var math = Math,
|
|
83
85
|
min = math.min,
|
|
84
86
|
pow = math.pow,
|
|
@@ -173,6 +175,7 @@ var Map = (function (Observable) {
|
|
|
173
175
|
|
|
174
176
|
this.initObserver(context);
|
|
175
177
|
this.initServices(context);
|
|
178
|
+
this._notifyObserver(INIT);
|
|
176
179
|
|
|
177
180
|
this._initOptions(options);
|
|
178
181
|
this._setEvents(options);
|
|
@@ -293,6 +296,8 @@ var Map = (function (Observable) {
|
|
|
293
296
|
|
|
294
297
|
if (options.zoom !== zoomLevel) {
|
|
295
298
|
options.zoom = zoomLevel;
|
|
299
|
+
this.widgetService.notify(ZOOM_CHANGE, { zoom: options.zoom });
|
|
300
|
+
|
|
296
301
|
this._reset();
|
|
297
302
|
}
|
|
298
303
|
result = this;
|
|
@@ -307,8 +312,14 @@ var Map = (function (Observable) {
|
|
|
307
312
|
var result;
|
|
308
313
|
|
|
309
314
|
if (center$1) {
|
|
310
|
-
|
|
311
|
-
this.
|
|
315
|
+
var current = Location.create(center$1);
|
|
316
|
+
var previous = Location.create(this.options.center);
|
|
317
|
+
if (!current.equals(previous)) {
|
|
318
|
+
this.options.center = current.toArray();
|
|
319
|
+
this.widgetService.notify(CENTER_CHANGE, { center: this.options.center });
|
|
320
|
+
this._reset();
|
|
321
|
+
}
|
|
322
|
+
|
|
312
323
|
result = this;
|
|
313
324
|
} else {
|
|
314
325
|
result = Location.create(this.options.center);
|
|
@@ -440,6 +451,7 @@ var Map = (function (Observable) {
|
|
|
440
451
|
topLeft.x += size.width / 2;
|
|
441
452
|
topLeft.y += size.height / 2;
|
|
442
453
|
this.options.center = this.layerToLocation(topLeft, zoom).toArray();
|
|
454
|
+
this.widgetService.notify(CENTER_CHANGE, { center: this.options.center });
|
|
443
455
|
|
|
444
456
|
return this;
|
|
445
457
|
};
|
package/dist/es2015/map/map.js
CHANGED
|
@@ -79,6 +79,8 @@ import {
|
|
|
79
79
|
|
|
80
80
|
import MapService from './../services/map-service';
|
|
81
81
|
|
|
82
|
+
import { CENTER_CHANGE, INIT, ZOOM_CHANGE } from './constants';
|
|
83
|
+
|
|
82
84
|
let math = Math,
|
|
83
85
|
min = math.min,
|
|
84
86
|
pow = math.pow,
|
|
@@ -159,6 +161,7 @@ class Map extends Observable {
|
|
|
159
161
|
|
|
160
162
|
this.initObserver(context);
|
|
161
163
|
this.initServices(context);
|
|
164
|
+
this._notifyObserver(INIT);
|
|
162
165
|
|
|
163
166
|
this._initOptions(options);
|
|
164
167
|
this._setEvents(options);
|
|
@@ -271,6 +274,8 @@ class Map extends Observable {
|
|
|
271
274
|
|
|
272
275
|
if (options.zoom !== zoomLevel) {
|
|
273
276
|
options.zoom = zoomLevel;
|
|
277
|
+
this.widgetService.notify(ZOOM_CHANGE, { zoom: options.zoom });
|
|
278
|
+
|
|
274
279
|
this._reset();
|
|
275
280
|
}
|
|
276
281
|
result = this;
|
|
@@ -285,8 +290,14 @@ class Map extends Observable {
|
|
|
285
290
|
let result;
|
|
286
291
|
|
|
287
292
|
if (center) {
|
|
288
|
-
|
|
289
|
-
this.
|
|
293
|
+
const current = Location.create(center);
|
|
294
|
+
const previous = Location.create(this.options.center);
|
|
295
|
+
if (!current.equals(previous)) {
|
|
296
|
+
this.options.center = current.toArray();
|
|
297
|
+
this.widgetService.notify(CENTER_CHANGE, { center: this.options.center });
|
|
298
|
+
this._reset();
|
|
299
|
+
}
|
|
300
|
+
|
|
290
301
|
result = this;
|
|
291
302
|
} else {
|
|
292
303
|
result = Location.create(this.options.center);
|
|
@@ -416,6 +427,7 @@ class Map extends Observable {
|
|
|
416
427
|
topLeft.x += size.width / 2;
|
|
417
428
|
topLeft.y += size.height / 2;
|
|
418
429
|
this.options.center = this.layerToLocation(topLeft, zoom).toArray();
|
|
430
|
+
this.widgetService.notify(CENTER_CHANGE, { center: this.options.center });
|
|
419
431
|
|
|
420
432
|
return this;
|
|
421
433
|
}
|