@syncfusion/ej2-maps 20.4.42 → 20.4.48
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/CHANGELOG.md +9 -1
- package/dist/ej2-maps.min.js +2 -2
- package/dist/ej2-maps.umd.min.js +2 -2
- package/dist/ej2-maps.umd.min.js.map +1 -1
- package/dist/es6/ej2-maps.es2015.js +25 -19
- package/dist/es6/ej2-maps.es2015.js.map +1 -1
- package/dist/es6/ej2-maps.es5.js +25 -19
- package/dist/es6/ej2-maps.es5.js.map +1 -1
- package/dist/global/ej2-maps.min.js +2 -2
- package/dist/global/ej2-maps.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +12 -12
- package/src/maps/layers/legend.js +3 -3
- package/src/maps/maps.d.ts +1 -0
- package/src/maps/maps.js +6 -2
- package/src/maps/user-interaction/tooltip.js +16 -14
package/dist/es6/ej2-maps.es5.js
CHANGED
|
@@ -8276,7 +8276,8 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8276
8276
|
EventHandler.add(this.element, 'keydown', this.keyDownHandler, this);
|
|
8277
8277
|
EventHandler.add(this.element, 'keyup', this.keyUpHandler, this);
|
|
8278
8278
|
// EventHandler.add(this.element, cancelEvent, this.mouseLeaveOnMap, this);
|
|
8279
|
-
|
|
8279
|
+
this.resizeEvent = this.mapsOnResize.bind(this);
|
|
8280
|
+
window.addEventListener((Browser.isTouch && ('orientation' in window && 'onorientationchange' in window)) ? 'orientationchange' : 'resize', this.resizeEvent);
|
|
8280
8281
|
};
|
|
8281
8282
|
/**
|
|
8282
8283
|
* To unbind event handlers from maps.
|
|
@@ -8295,7 +8296,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8295
8296
|
EventHandler.remove(this.element, 'keydown', this.keyDownHandler);
|
|
8296
8297
|
EventHandler.remove(this.element, 'keyup', this.keyUpHandler);
|
|
8297
8298
|
//EventHandler.remove(this.element, cancelEvent, this.mouseLeaveOnMap);
|
|
8298
|
-
window.removeEventListener((Browser.isTouch && ('orientation' in window && 'onorientationchange' in window)) ? 'orientationchange' : 'resize', this.
|
|
8299
|
+
window.removeEventListener((Browser.isTouch && ('orientation' in window && 'onorientationchange' in window)) ? 'orientationchange' : 'resize', this.resizeEvent);
|
|
8299
8300
|
};
|
|
8300
8301
|
/**
|
|
8301
8302
|
* This method is used to perform operations when mouse pointer leave from maps.
|
|
@@ -9141,6 +9142,9 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
9141
9142
|
*/
|
|
9142
9143
|
Maps.prototype.destroy = function () {
|
|
9143
9144
|
this.unWireEVents();
|
|
9145
|
+
if (!isNullOrUndefined(this.mapsTooltipModule)) {
|
|
9146
|
+
this.mapsTooltipModule.removeEventListener();
|
|
9147
|
+
}
|
|
9144
9148
|
_super.prototype.destroy.call(this);
|
|
9145
9149
|
this.shapeSelectionItem = [];
|
|
9146
9150
|
this.toggledShapeElementId = [];
|
|
@@ -11238,14 +11242,14 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
11238
11242
|
' L ' + (rightPageX - width) + ' ' + (locY + height) + ' z ';
|
|
11239
11243
|
var leftPath = ' M ' + leftPageX + ' ' + locY + ' L ' + (leftPageX + width) + ' ' + (locY - height) +
|
|
11240
11244
|
' L ' + (leftPageX + width) + ' ' + (locY + height) + ' z ';
|
|
11241
|
-
var leftPageOptions = new PathOption(map.element.id + '_Left_Page',
|
|
11245
|
+
var leftPageOptions = new PathOption(map.element.id + '_Left_Page', this.maps.themeStyle.legendTextColor, 0, this.maps.themeStyle.legendTextColor, ((page + 1) === 1 ? 0.5 : 1), 1, '', leftPath);
|
|
11242
11246
|
leftPageElement.appendChild(render.drawPath(leftPageOptions));
|
|
11243
11247
|
var leftRectPageOptions = new RectOption(map.element.id + '_Left_Page_Rect', 'transparent', {}, 1, new Rect(leftPageX - (width / 2), (locY - (height * 2)), width * 2, spacing * 2), null, null, '', '');
|
|
11244
11248
|
var pathEle = render.drawRectangle(leftRectPageOptions);
|
|
11245
11249
|
pathEle.tabIndex = (page + 1) === 1 ? -1 : (map.tabIndex + 1);
|
|
11246
11250
|
leftPageElement.appendChild(pathEle);
|
|
11247
11251
|
this.wireEvents(leftPageElement);
|
|
11248
|
-
var rightPageOptions = new PathOption(map.element.id + '_Right_Page',
|
|
11252
|
+
var rightPageOptions = new PathOption(map.element.id + '_Right_Page', this.maps.themeStyle.legendTextColor, 0, this.maps.themeStyle.legendTextColor, ((page + 1) === this.totalPages.length ? 0.5 : 1), 1, '', rightPath);
|
|
11249
11253
|
rightPageElement.appendChild(render.drawPath(rightPageOptions));
|
|
11250
11254
|
var rightRectPageOptions = new RectOption(map.element.id + '_Right_Page_Rect', 'transparent', {}, 1, new Rect(rightPageX - spacing - (width / 2), (locY - (height * 2)), width * 2, spacing * 2), null, null, '', '');
|
|
11251
11255
|
pathEle = render.drawRectangle(rightRectPageOptions);
|
|
@@ -11259,7 +11263,7 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
11259
11263
|
'id': map.element.id + '_Paging_Text',
|
|
11260
11264
|
'x': pageTextX,
|
|
11261
11265
|
'y': locY + (pagingTextSize.height / 4),
|
|
11262
|
-
'fill':
|
|
11266
|
+
'fill': this.maps.themeStyle.legendTextColor,
|
|
11263
11267
|
'font-size': '14px',
|
|
11264
11268
|
'font-style': pagingFont.fontStyle,
|
|
11265
11269
|
'font-family': pagingFont.fontFamily,
|
|
@@ -13808,23 +13812,26 @@ var MapsTooltip = /** @__PURE__ @class */ (function () {
|
|
|
13808
13812
|
else {
|
|
13809
13813
|
this.maps.on(Browser.touchMoveEvent, this.renderTooltip, this);
|
|
13810
13814
|
}
|
|
13811
|
-
this.maps.element.addEventListener('contextmenu', this.removeTooltip);
|
|
13812
13815
|
this.maps.on(Browser.touchCancelEvent, this.removeTooltip, this);
|
|
13816
|
+
this.maps.element.addEventListener('contextmenu', this.removeTooltip);
|
|
13813
13817
|
};
|
|
13814
13818
|
MapsTooltip.prototype.removeEventListener = function () {
|
|
13815
|
-
if (this.maps
|
|
13816
|
-
|
|
13817
|
-
|
|
13818
|
-
|
|
13819
|
-
this.maps.
|
|
13820
|
-
|
|
13821
|
-
|
|
13822
|
-
this.maps.
|
|
13823
|
-
|
|
13824
|
-
|
|
13825
|
-
|
|
13819
|
+
if (this.maps) {
|
|
13820
|
+
if (this.maps.isDestroyed) {
|
|
13821
|
+
return;
|
|
13822
|
+
}
|
|
13823
|
+
if (this.maps.tooltipDisplayMode === 'DoubleClick') {
|
|
13824
|
+
this.maps.off('dblclick', this.removeTooltip);
|
|
13825
|
+
}
|
|
13826
|
+
else if (this.maps.tooltipDisplayMode === 'Click') {
|
|
13827
|
+
this.maps.off(Browser.touchEndEvent, this.mouseUpHandler);
|
|
13828
|
+
}
|
|
13829
|
+
else {
|
|
13830
|
+
this.maps.off(Browser.touchMoveEvent, this.renderTooltip);
|
|
13831
|
+
}
|
|
13832
|
+
this.maps.off(Browser.touchCancelEvent, this.removeTooltip);
|
|
13833
|
+
this.maps.element.removeEventListener('contextmenu', this.removeTooltip);
|
|
13826
13834
|
}
|
|
13827
|
-
this.maps.off(Browser.touchCancelEvent, this.removeTooltip);
|
|
13828
13835
|
};
|
|
13829
13836
|
/**
|
|
13830
13837
|
* Get module name.
|
|
@@ -13845,7 +13852,6 @@ var MapsTooltip = /** @__PURE__ @class */ (function () {
|
|
|
13845
13852
|
this.svgTooltip.destroy();
|
|
13846
13853
|
}
|
|
13847
13854
|
this.svgTooltip = null;
|
|
13848
|
-
this.removeEventListener();
|
|
13849
13855
|
//TODO: Calling the below code throws spec issue.
|
|
13850
13856
|
//this.maps = null;
|
|
13851
13857
|
};
|