@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
|
@@ -8000,7 +8000,8 @@ let Maps = class Maps extends Component {
|
|
|
8000
8000
|
EventHandler.add(this.element, 'keydown', this.keyDownHandler, this);
|
|
8001
8001
|
EventHandler.add(this.element, 'keyup', this.keyUpHandler, this);
|
|
8002
8002
|
// EventHandler.add(this.element, cancelEvent, this.mouseLeaveOnMap, this);
|
|
8003
|
-
|
|
8003
|
+
this.resizeEvent = this.mapsOnResize.bind(this);
|
|
8004
|
+
window.addEventListener((Browser.isTouch && ('orientation' in window && 'onorientationchange' in window)) ? 'orientationchange' : 'resize', this.resizeEvent);
|
|
8004
8005
|
}
|
|
8005
8006
|
/**
|
|
8006
8007
|
* To unbind event handlers from maps.
|
|
@@ -8019,7 +8020,7 @@ let Maps = class Maps extends Component {
|
|
|
8019
8020
|
EventHandler.remove(this.element, 'keydown', this.keyDownHandler);
|
|
8020
8021
|
EventHandler.remove(this.element, 'keyup', this.keyUpHandler);
|
|
8021
8022
|
//EventHandler.remove(this.element, cancelEvent, this.mouseLeaveOnMap);
|
|
8022
|
-
window.removeEventListener((Browser.isTouch && ('orientation' in window && 'onorientationchange' in window)) ? 'orientationchange' : 'resize', this.
|
|
8023
|
+
window.removeEventListener((Browser.isTouch && ('orientation' in window && 'onorientationchange' in window)) ? 'orientationchange' : 'resize', this.resizeEvent);
|
|
8023
8024
|
}
|
|
8024
8025
|
/**
|
|
8025
8026
|
* This method is used to perform operations when mouse pointer leave from maps.
|
|
@@ -8861,6 +8862,9 @@ let Maps = class Maps extends Component {
|
|
|
8861
8862
|
*/
|
|
8862
8863
|
destroy() {
|
|
8863
8864
|
this.unWireEVents();
|
|
8865
|
+
if (!isNullOrUndefined(this.mapsTooltipModule)) {
|
|
8866
|
+
this.mapsTooltipModule.removeEventListener();
|
|
8867
|
+
}
|
|
8864
8868
|
super.destroy();
|
|
8865
8869
|
this.shapeSelectionItem = [];
|
|
8866
8870
|
this.toggledShapeElementId = [];
|
|
@@ -10936,14 +10940,14 @@ class Legend {
|
|
|
10936
10940
|
' L ' + (rightPageX - width) + ' ' + (locY + height) + ' z ';
|
|
10937
10941
|
const leftPath = ' M ' + leftPageX + ' ' + locY + ' L ' + (leftPageX + width) + ' ' + (locY - height) +
|
|
10938
10942
|
' L ' + (leftPageX + width) + ' ' + (locY + height) + ' z ';
|
|
10939
|
-
const leftPageOptions = new PathOption(map.element.id + '_Left_Page',
|
|
10943
|
+
const 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);
|
|
10940
10944
|
leftPageElement.appendChild(render.drawPath(leftPageOptions));
|
|
10941
10945
|
const 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, '', '');
|
|
10942
10946
|
let pathEle = render.drawRectangle(leftRectPageOptions);
|
|
10943
10947
|
pathEle.tabIndex = (page + 1) === 1 ? -1 : (map.tabIndex + 1);
|
|
10944
10948
|
leftPageElement.appendChild(pathEle);
|
|
10945
10949
|
this.wireEvents(leftPageElement);
|
|
10946
|
-
const rightPageOptions = new PathOption(map.element.id + '_Right_Page',
|
|
10950
|
+
const 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);
|
|
10947
10951
|
rightPageElement.appendChild(render.drawPath(rightPageOptions));
|
|
10948
10952
|
const 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, '', '');
|
|
10949
10953
|
pathEle = render.drawRectangle(rightRectPageOptions);
|
|
@@ -10957,7 +10961,7 @@ class Legend {
|
|
|
10957
10961
|
'id': map.element.id + '_Paging_Text',
|
|
10958
10962
|
'x': pageTextX,
|
|
10959
10963
|
'y': locY + (pagingTextSize.height / 4),
|
|
10960
|
-
'fill':
|
|
10964
|
+
'fill': this.maps.themeStyle.legendTextColor,
|
|
10961
10965
|
'font-size': '14px',
|
|
10962
10966
|
'font-style': pagingFont.fontStyle,
|
|
10963
10967
|
'font-family': pagingFont.fontFamily,
|
|
@@ -13483,23 +13487,26 @@ class MapsTooltip {
|
|
|
13483
13487
|
else {
|
|
13484
13488
|
this.maps.on(Browser.touchMoveEvent, this.renderTooltip, this);
|
|
13485
13489
|
}
|
|
13486
|
-
this.maps.element.addEventListener('contextmenu', this.removeTooltip);
|
|
13487
13490
|
this.maps.on(Browser.touchCancelEvent, this.removeTooltip, this);
|
|
13491
|
+
this.maps.element.addEventListener('contextmenu', this.removeTooltip);
|
|
13488
13492
|
}
|
|
13489
13493
|
removeEventListener() {
|
|
13490
|
-
if (this.maps
|
|
13491
|
-
|
|
13492
|
-
|
|
13493
|
-
|
|
13494
|
-
this.maps.
|
|
13495
|
-
|
|
13496
|
-
|
|
13497
|
-
this.maps.
|
|
13498
|
-
|
|
13499
|
-
|
|
13500
|
-
|
|
13494
|
+
if (this.maps) {
|
|
13495
|
+
if (this.maps.isDestroyed) {
|
|
13496
|
+
return;
|
|
13497
|
+
}
|
|
13498
|
+
if (this.maps.tooltipDisplayMode === 'DoubleClick') {
|
|
13499
|
+
this.maps.off('dblclick', this.removeTooltip);
|
|
13500
|
+
}
|
|
13501
|
+
else if (this.maps.tooltipDisplayMode === 'Click') {
|
|
13502
|
+
this.maps.off(Browser.touchEndEvent, this.mouseUpHandler);
|
|
13503
|
+
}
|
|
13504
|
+
else {
|
|
13505
|
+
this.maps.off(Browser.touchMoveEvent, this.renderTooltip);
|
|
13506
|
+
}
|
|
13507
|
+
this.maps.off(Browser.touchCancelEvent, this.removeTooltip);
|
|
13508
|
+
this.maps.element.removeEventListener('contextmenu', this.removeTooltip);
|
|
13501
13509
|
}
|
|
13502
|
-
this.maps.off(Browser.touchCancelEvent, this.removeTooltip);
|
|
13503
13510
|
}
|
|
13504
13511
|
/**
|
|
13505
13512
|
* Get module name.
|
|
@@ -13520,7 +13527,6 @@ class MapsTooltip {
|
|
|
13520
13527
|
this.svgTooltip.destroy();
|
|
13521
13528
|
}
|
|
13522
13529
|
this.svgTooltip = null;
|
|
13523
|
-
this.removeEventListener();
|
|
13524
13530
|
//TODO: Calling the below code throws spec issue.
|
|
13525
13531
|
//this.maps = null;
|
|
13526
13532
|
}
|