@syncfusion/ej2-maps 19.4.42 → 19.4.53
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 +24 -0
- 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 +195 -48
- package/dist/es6/ej2-maps.es2015.js.map +1 -1
- package/dist/es6/ej2-maps.es5.js +195 -48
- 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/layer-panel.js +3 -2
- package/src/maps/layers/legend.d.ts +41 -2
- package/src/maps/layers/legend.js +43 -11
- package/src/maps/maps-model.d.ts +1 -1
- package/src/maps/maps.d.ts +5 -1
- package/src/maps/maps.js +107 -13
- package/src/maps/user-interaction/highlight.d.ts +9 -1
- package/src/maps/user-interaction/highlight.js +18 -11
- package/src/maps/user-interaction/selection.d.ts +9 -1
- package/src/maps/user-interaction/selection.js +17 -10
- package/src/maps/user-interaction/zoom.d.ts +4 -1
- package/src/maps/user-interaction/zoom.js +9 -3
package/dist/es6/ej2-maps.es5.js
CHANGED
|
@@ -5727,7 +5727,8 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
|
|
|
5727
5727
|
else {
|
|
5728
5728
|
this.clipRectElement = this.mapObject.renderer.drawClipPath(new RectOption(this.mapObject.element.id + '_MapArea_ClipRect', 'transparent', { width: 1, color: 'Gray' }, 1, {
|
|
5729
5729
|
x: this.mapObject.isTileMap ? 0 : areaRect.x, y: this.mapObject.isTileMap ? 0 : areaRect.y,
|
|
5730
|
-
width: areaRect.width, height: (areaRect.height < 0) ? 0 :
|
|
5730
|
+
width: areaRect.width, height: (areaRect.height < 0) ? 0 : !isNullOrUndefined(this.mapObject.legendModule) &&
|
|
5731
|
+
this.mapObject.legendModule.totalPages.length > 0 ? this.mapObject.legendModule.legendTotalRect.height : areaRect.height
|
|
5731
5732
|
}));
|
|
5732
5733
|
}
|
|
5733
5734
|
this.layerGroup.appendChild(this.clipRectElement);
|
|
@@ -6195,7 +6196,7 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
|
|
|
6195
6196
|
}
|
|
6196
6197
|
pathEle.setAttribute('aria-label', ((!isNullOrUndefined(currentShapeData['property'])) ?
|
|
6197
6198
|
(currentShapeData['property'][properties]) : ''));
|
|
6198
|
-
pathEle.setAttribute('tabindex', (_this.mapObject.tabIndex + i +
|
|
6199
|
+
pathEle.setAttribute('tabindex', (_this.mapObject.tabIndex + i + 3).toString());
|
|
6199
6200
|
if (drawingType === 'LineString') {
|
|
6200
6201
|
pathEle.setAttribute('style', 'outline:none');
|
|
6201
6202
|
}
|
|
@@ -7873,7 +7874,6 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
7873
7874
|
var titleBounds = new Rect(location_1.x, location_1.y, elementSize.width, elementSize.height);
|
|
7874
7875
|
var element = renderTextElement(options, style, style.color || (type === 'title' ? this.themeStyle.titleFontColor : this.themeStyle.subTitleFontColor), groupEle);
|
|
7875
7876
|
element.setAttribute('aria-label', this.description || title.text);
|
|
7876
|
-
element.setAttribute('tabindex', (this.tabIndex + (type === 'title' ? 1 : 2)).toString());
|
|
7877
7877
|
if ((type === 'title' && !title.subtitleSettings.text) || (type === 'subtitle')) {
|
|
7878
7878
|
height = Math.abs((titleBounds.y + this.margin.bottom) - this.availableSize.height);
|
|
7879
7879
|
this.mapAreaRect = new Rect(this.margin.left, titleBounds.y + 10, width, height - 10);
|
|
@@ -7932,6 +7932,8 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
7932
7932
|
EventHandler.add(this.element, Browser.touchMoveEvent, this.mouseMoveOnMap, this);
|
|
7933
7933
|
EventHandler.add(this.element, Browser.touchEndEvent, this.mouseEndOnMap, this);
|
|
7934
7934
|
EventHandler.add(this.element, 'pointerleave mouseleave', this.mouseLeaveOnMap, this);
|
|
7935
|
+
EventHandler.add(this.element, 'keydown', this.keyDownHandler, this);
|
|
7936
|
+
EventHandler.add(this.element, 'keyup', this.keyUpHandler, this);
|
|
7935
7937
|
// EventHandler.add(this.element, cancelEvent, this.mouseLeaveOnMap, this);
|
|
7936
7938
|
window.addEventListener((Browser.isTouch && ('orientation' in window && 'onorientationchange' in window)) ? 'orientationchange' : 'resize', this.mapsOnResize.bind(this));
|
|
7937
7939
|
};
|
|
@@ -7949,6 +7951,8 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
7949
7951
|
EventHandler.remove(this.element, Browser.touchMoveEvent, this.mouseMoveOnMap);
|
|
7950
7952
|
EventHandler.remove(this.element, Browser.touchEndEvent, this.mouseEndOnMap);
|
|
7951
7953
|
EventHandler.remove(this.element, 'pointerleave mouseleave', this.mouseLeaveOnMap);
|
|
7954
|
+
EventHandler.remove(this.element, 'keydown', this.keyDownHandler);
|
|
7955
|
+
EventHandler.remove(this.element, 'keyup', this.keyUpHandler);
|
|
7952
7956
|
//EventHandler.remove(this.element, cancelEvent, this.mouseLeaveOnMap);
|
|
7953
7957
|
window.removeEventListener((Browser.isTouch && ('orientation' in window && 'onorientationchange' in window)) ? 'orientationchange' : 'resize', this.mapsOnResize);
|
|
7954
7958
|
};
|
|
@@ -7964,6 +7968,96 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
7964
7968
|
removeClass(document.getElementsByClassName('highlightMapStyle')[0]);
|
|
7965
7969
|
}
|
|
7966
7970
|
};
|
|
7971
|
+
Maps.prototype.keyUpHandler = function (event) {
|
|
7972
|
+
var id = event.target['id'];
|
|
7973
|
+
if (event.code === 'Tab' && id.indexOf('_LayerIndex_') > -1 && id.indexOf('shapeIndex') > -1) {
|
|
7974
|
+
this.keyboardHighlightSelection(id, event.type);
|
|
7975
|
+
}
|
|
7976
|
+
else if (id.indexOf('_LayerIndex_') === -1 && id.indexOf('shapeIndex') === -1 &&
|
|
7977
|
+
getElementsByClassName('highlightMapStyle').length > 0) {
|
|
7978
|
+
removeClass(getElementsByClassName('highlightMapStyle')[0]);
|
|
7979
|
+
if (this.legendSettings.visible && this.legendModule) {
|
|
7980
|
+
this.legendModule.removeShapeHighlightCollection();
|
|
7981
|
+
}
|
|
7982
|
+
}
|
|
7983
|
+
};
|
|
7984
|
+
Maps.prototype.keyboardHighlightSelection = function (id, key) {
|
|
7985
|
+
var layerIndex = parseInt(id.split('_LayerIndex_')[1].split('_')[0], 10);
|
|
7986
|
+
var shapeIndex = parseInt(id.split('_shapeIndex_')[1].split('_')[0], 10);
|
|
7987
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
7988
|
+
var shapeData = this.layers[layerIndex].shapeData['features']['length'] > shapeIndex ?
|
|
7989
|
+
this.layers[layerIndex].shapeData['features'][shapeIndex]['properties'] : null;
|
|
7990
|
+
var dataIndex = parseInt(id.split('_dataIndex_')[1].split('_')[0], 10);
|
|
7991
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
7992
|
+
var data = isNullOrUndefined(dataIndex) ? null : this.layers[layerIndex].dataSource[dataIndex];
|
|
7993
|
+
if (this.layers[layerIndex].selectionSettings.enable && key === 'keydown' && this.selectionModule) {
|
|
7994
|
+
this.selectionModule.selectionsettings = this.layers[layerIndex].selectionSettings;
|
|
7995
|
+
this.selectionModule.selectionType = 'Shape';
|
|
7996
|
+
this.selectionModule.selectElement(event.target, layerIndex, data, shapeData);
|
|
7997
|
+
}
|
|
7998
|
+
else if (this.highlightModule && (this.layers[layerIndex].highlightSettings.enable && key === 'keyup' &&
|
|
7999
|
+
!event.target.classList.contains('ShapeselectionMapStyle'))) {
|
|
8000
|
+
this.highlightModule.highlightSettings = this.layers[layerIndex].highlightSettings;
|
|
8001
|
+
this.highlightModule.handleHighlight(event.target, layerIndex, data, shapeData);
|
|
8002
|
+
}
|
|
8003
|
+
};
|
|
8004
|
+
Maps.prototype.keyDownHandler = function (event) {
|
|
8005
|
+
var zoom = this.zoomModule;
|
|
8006
|
+
if ((event.key === '+' || event.code === 'Equal') && zoom) {
|
|
8007
|
+
zoom.performZoomingByToolBar('zoomin');
|
|
8008
|
+
}
|
|
8009
|
+
else if ((event.key === '-' || event.code === 'Minus') && zoom) {
|
|
8010
|
+
zoom.performZoomingByToolBar('zoomout');
|
|
8011
|
+
}
|
|
8012
|
+
else if (event['keyCode'] === 82 && zoom) {
|
|
8013
|
+
zoom.performZoomingByToolBar('reset');
|
|
8014
|
+
}
|
|
8015
|
+
else if ((event.code === 'ArrowUp' || event.code === 'ArrowDown') && zoom) {
|
|
8016
|
+
event.preventDefault();
|
|
8017
|
+
zoom.mouseDownLatLong['x'] = 0;
|
|
8018
|
+
zoom.mouseMoveLatLong['y'] = this.mapAreaRect.height / 7;
|
|
8019
|
+
zoom.panning('None', zoom.mouseDownLatLong['x'], event.code === 'ArrowUp' ? -(zoom.mouseMoveLatLong['y']) :
|
|
8020
|
+
zoom.mouseMoveLatLong['y'], event);
|
|
8021
|
+
zoom.mouseDownLatLong['y'] = zoom.mouseMoveLatLong['y'];
|
|
8022
|
+
}
|
|
8023
|
+
else if ((event.code === 'ArrowLeft' || event.code === 'ArrowRight') && zoom) {
|
|
8024
|
+
event.preventDefault();
|
|
8025
|
+
zoom.mouseDownLatLong['y'] = 0;
|
|
8026
|
+
zoom.mouseMoveLatLong['x'] = this.mapAreaRect.width / 7;
|
|
8027
|
+
zoom.panning('None', event.code === 'ArrowLeft' ? -(zoom.mouseMoveLatLong['x']) : zoom.mouseMoveLatLong['x'], zoom.mouseDownLatLong['y'], event);
|
|
8028
|
+
zoom.mouseDownLatLong['x'] = zoom.mouseMoveLatLong['x'];
|
|
8029
|
+
}
|
|
8030
|
+
else if (event.code === 'Enter') {
|
|
8031
|
+
var id = event.target['id'];
|
|
8032
|
+
event.preventDefault();
|
|
8033
|
+
if (this.legendModule && (id.indexOf('_Left_Page_Rect') > -1 || id.indexOf('_Right_Page_Rect') > -1)) {
|
|
8034
|
+
this.legendModule.currentPage = (id.indexOf('_Left_Page_') > -1) ? (this.legendModule.currentPage - 1) :
|
|
8035
|
+
(this.legendModule.currentPage + 1);
|
|
8036
|
+
this.legendModule.legendGroup = this.renderer.createGroup({ id: this.element.id + '_Legend_Group' });
|
|
8037
|
+
this.legendModule.drawLegendItem(this.legendModule.currentPage);
|
|
8038
|
+
var textContent = (document.getElementById(this.element.id + '_Paging_Text')).textContent;
|
|
8039
|
+
var text = textContent.split('/').map(Number);
|
|
8040
|
+
if (id.indexOf('_Left_Page_Rect') > -1) {
|
|
8041
|
+
if (text[0] !== 1) {
|
|
8042
|
+
event.target.focus();
|
|
8043
|
+
}
|
|
8044
|
+
event.target.style.outlineColor = text[0] - 1 !== text[1] ? '' : 'transparent';
|
|
8045
|
+
}
|
|
8046
|
+
else if (id.indexOf('_Right_Page_Rect') > -1) {
|
|
8047
|
+
if (text[0] !== text[1]) {
|
|
8048
|
+
event.target.focus();
|
|
8049
|
+
}
|
|
8050
|
+
event.target.style.outlineColor = text[0] !== text[1] + 1 ? '' : 'transparent';
|
|
8051
|
+
}
|
|
8052
|
+
if (querySelector(this.element.id + '_Legend_Border', this.element.id)) {
|
|
8053
|
+
querySelector(this.element.id + '_Legend_Border', this.element.id).style.pointerEvents = 'none';
|
|
8054
|
+
}
|
|
8055
|
+
}
|
|
8056
|
+
if (id.indexOf('shapeIndex') > -1) {
|
|
8057
|
+
this.keyboardHighlightSelection(id, event.type);
|
|
8058
|
+
}
|
|
8059
|
+
}
|
|
8060
|
+
};
|
|
7967
8061
|
/**
|
|
7968
8062
|
* Gets the selected element to be maintained or not.
|
|
7969
8063
|
*
|
|
@@ -8010,12 +8104,8 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8010
8104
|
}
|
|
8011
8105
|
}
|
|
8012
8106
|
if (_this.markerModule) {
|
|
8013
|
-
_this.markerModule.markerClick(e);
|
|
8014
8107
|
_this.markerModule.markerClusterClick(e);
|
|
8015
8108
|
}
|
|
8016
|
-
if (_this.bubbleModule) {
|
|
8017
|
-
_this.bubbleModule.bubbleClick(e);
|
|
8018
|
-
}
|
|
8019
8109
|
if (!eventArgs_1.cancel) {
|
|
8020
8110
|
_this.notify(click, targetEle);
|
|
8021
8111
|
}
|
|
@@ -8910,16 +9000,21 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8910
9000
|
};
|
|
8911
9001
|
/**
|
|
8912
9002
|
* To find space between the secondary element and svg element.
|
|
9003
|
+
* @private
|
|
8913
9004
|
*/
|
|
8914
9005
|
Maps.prototype.getExtraPosition = function () {
|
|
8915
|
-
var top;
|
|
8916
|
-
var left;
|
|
9006
|
+
var top = 0;
|
|
9007
|
+
var left = 0;
|
|
8917
9008
|
var svgElement = getElement(this.element.id + '_svg');
|
|
8918
9009
|
if (!isNullOrUndefined(svgElement)) {
|
|
8919
|
-
var
|
|
8920
|
-
var
|
|
8921
|
-
|
|
8922
|
-
|
|
9010
|
+
var svgClientRects = svgElement.getClientRects();
|
|
9011
|
+
var mapsClientRects = (getElement(this.element.id + '_Secondary_Element')).getClientRects();
|
|
9012
|
+
if (svgClientRects.length !== 0 && mapsClientRects.length !== 0) {
|
|
9013
|
+
var svgClientRect = svgClientRects[0];
|
|
9014
|
+
var mapsClientRect = mapsClientRects[0];
|
|
9015
|
+
top = svgClientRect.top - mapsClientRect.top;
|
|
9016
|
+
left = svgClientRect.left - mapsClientRect.left;
|
|
9017
|
+
}
|
|
8923
9018
|
}
|
|
8924
9019
|
return new Point(left, top);
|
|
8925
9020
|
};
|
|
@@ -10137,7 +10232,14 @@ var NavigationLine = /** @__PURE__ @class */ (function () {
|
|
|
10137
10232
|
*/
|
|
10138
10233
|
var Legend = /** @__PURE__ @class */ (function () {
|
|
10139
10234
|
function Legend(maps) {
|
|
10235
|
+
/**
|
|
10236
|
+
* @private
|
|
10237
|
+
*/
|
|
10140
10238
|
this.legendBorderRect = new Rect(0, 0, 0, 0);
|
|
10239
|
+
/**
|
|
10240
|
+
* @private
|
|
10241
|
+
*/
|
|
10242
|
+
this.legendTotalRect = new Rect(0, 0, 0, 0);
|
|
10141
10243
|
/**
|
|
10142
10244
|
* @private
|
|
10143
10245
|
*/
|
|
@@ -10154,12 +10256,27 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
10154
10256
|
this.textMaxWidth = 0;
|
|
10155
10257
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10156
10258
|
this.shapeHighlightCollection = [];
|
|
10259
|
+
/**
|
|
10260
|
+
* @private
|
|
10261
|
+
*/
|
|
10157
10262
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10158
10263
|
this.legendHighlightCollection = [];
|
|
10264
|
+
/**
|
|
10265
|
+
* @private
|
|
10266
|
+
*/
|
|
10159
10267
|
this.shapePreviousColor = [];
|
|
10268
|
+
/**
|
|
10269
|
+
* @private
|
|
10270
|
+
*/
|
|
10160
10271
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10161
10272
|
this.selectedNonLegendShapes = [];
|
|
10273
|
+
/**
|
|
10274
|
+
* @private
|
|
10275
|
+
*/
|
|
10162
10276
|
this.shapeToggled = true;
|
|
10277
|
+
/**
|
|
10278
|
+
* @private
|
|
10279
|
+
*/
|
|
10163
10280
|
this.legendElement = null;
|
|
10164
10281
|
this.maps = maps;
|
|
10165
10282
|
this.addEventListener();
|
|
@@ -10540,6 +10657,11 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
10540
10657
|
this.drawLegendItem(this.currentPage);
|
|
10541
10658
|
}
|
|
10542
10659
|
};
|
|
10660
|
+
/**
|
|
10661
|
+
* @param {string} page - Specifies the legend page.
|
|
10662
|
+
* @returns {void}
|
|
10663
|
+
* @private
|
|
10664
|
+
*/
|
|
10543
10665
|
Legend.prototype.drawLegendItem = function (page) {
|
|
10544
10666
|
var map = this.maps;
|
|
10545
10667
|
var legend = map.legendSettings;
|
|
@@ -10559,6 +10681,7 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
10559
10681
|
var shapeBorder = collection['shapeBorder'];
|
|
10560
10682
|
var legendElement = render.createGroup({ id: map.element.id + '_Legend_Index_' + collection['idIndex'] });
|
|
10561
10683
|
var legendText = collection['DisplayText'];
|
|
10684
|
+
var pagingArrowPadding = 4;
|
|
10562
10685
|
var shape = ((legend.type === 'Markers') ? ((isNullOrUndefined(collection['ImageSrc'])) ?
|
|
10563
10686
|
legend.shape : 'Image') : collection['legendShape']);
|
|
10564
10687
|
var strokeColor = (legend.shape === 'HorizontalLine' || legend.shape === 'VerticalLine'
|
|
@@ -10568,8 +10691,8 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
10568
10691
|
1 : shapeBorder.width : shapeBorder.width;
|
|
10569
10692
|
var shapeId = map.element.id + '_Legend_Shape_Index_' + collection['idIndex'];
|
|
10570
10693
|
var textId = map.element.id + '_Legend_Text_Index_' + collection['idIndex'];
|
|
10571
|
-
var shapeLocation = collection['Shape'];
|
|
10572
|
-
var textLocation = collection['Text'];
|
|
10694
|
+
var shapeLocation = new Point(collection['Shape']['x'], (collection['Shape']['y'] - pagingArrowPadding));
|
|
10695
|
+
var textLocation = new Point(collection['Text']['x'], (collection['Text']['y'] - pagingArrowPadding));
|
|
10573
10696
|
var imageUrl = ((isNullOrUndefined(collection['ImageSrc'])) ? legend.shape : collection['ImageSrc']);
|
|
10574
10697
|
var renderOptions_1 = new PathOption(shapeId, collection['Fill'], strokeWidth, strokeColor, legend.opacity, isNullOrUndefined(shapeBorder.opacity) ? legend.opacity : shapeBorder.opacity, '');
|
|
10575
10698
|
var legendTextStyle = {
|
|
@@ -10612,10 +10735,10 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
10612
10735
|
var pagingFont = legend.textStyle;
|
|
10613
10736
|
var pagingTextSize = measureText(pagingText, pagingFont);
|
|
10614
10737
|
var leftPageX = (this.legendItemRect.x + this.legendItemRect.width) - pagingTextSize.width -
|
|
10615
|
-
(width * 2) - spacing;
|
|
10738
|
+
(width * 2) - (spacing * 2) + (pagingArrowPadding / 2);
|
|
10616
10739
|
var rightPageX = (this.legendItemRect.x + this.legendItemRect.width);
|
|
10740
|
+
var pageTextX = rightPageX - width - (pagingTextSize.width / 2) - (spacing / 2) - pagingArrowPadding;
|
|
10617
10741
|
var locY = (this.legendItemRect.y + this.legendItemRect.height) + (height / 2) + spacing;
|
|
10618
|
-
var pageTextX = rightPageX - width - (pagingTextSize.width / 2) - (spacing / 2);
|
|
10619
10742
|
pagingGroup = render.createGroup({ id: map.element.id + '_Legend_Paging_Group' });
|
|
10620
10743
|
var leftPageElement = render.createGroup({ id: map.element.id + '_Legend_Left_Paging_Group' });
|
|
10621
10744
|
var rightPageElement = render.createGroup({ id: map.element.id + '_Legend_Right_Paging_Group' });
|
|
@@ -10623,15 +10746,19 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
10623
10746
|
' L ' + (rightPageX - width) + ' ' + (locY + height) + ' z ';
|
|
10624
10747
|
var leftPath = ' M ' + leftPageX + ' ' + locY + ' L ' + (leftPageX + width) + ' ' + (locY - height) +
|
|
10625
10748
|
' L ' + (leftPageX + width) + ' ' + (locY + height) + ' z ';
|
|
10626
|
-
var leftPageOptions = new PathOption(map.element.id + '_Left_Page', '#a6a6a6', 0, '#a6a6a6', 1, 1, '', leftPath);
|
|
10749
|
+
var leftPageOptions = new PathOption(map.element.id + '_Left_Page', '#a6a6a6', 0, '#a6a6a6', ((page + 1) === 1 ? 0.5 : 1), 1, '', leftPath);
|
|
10627
10750
|
leftPageElement.appendChild(render.drawPath(leftPageOptions));
|
|
10628
10751
|
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, '', '');
|
|
10629
|
-
|
|
10752
|
+
var pathEle = render.drawRectangle(leftRectPageOptions);
|
|
10753
|
+
pathEle.setAttribute('tabindex', ((page + 1) === 1 ? -1 : map.tabIndex + 1).toString());
|
|
10754
|
+
leftPageElement.appendChild(pathEle);
|
|
10630
10755
|
this.wireEvents(leftPageElement);
|
|
10631
|
-
var rightPageOptions = new PathOption(map.element.id + '_Right_Page', '#a6a6a6', 0, '#a6a6a6', 1, 1, '', rightPath);
|
|
10756
|
+
var rightPageOptions = new PathOption(map.element.id + '_Right_Page', '#a6a6a6', 0, '#a6a6a6', ((page + 1) === this.totalPages.length ? 0.5 : 1), 1, '', rightPath);
|
|
10632
10757
|
rightPageElement.appendChild(render.drawPath(rightPageOptions));
|
|
10633
|
-
var rightRectPageOptions = new RectOption(map.element.id + '_Right_Page_Rect', 'transparent', {}, 1, new Rect(
|
|
10634
|
-
|
|
10758
|
+
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, '', '');
|
|
10759
|
+
pathEle = render.drawRectangle(rightRectPageOptions);
|
|
10760
|
+
pathEle.setAttribute('tabindex', ((page + 1) === this.totalPages.length ? -1 : map.tabIndex + 2).toString());
|
|
10761
|
+
rightPageElement.appendChild(pathEle);
|
|
10635
10762
|
this.wireEvents(rightPageElement);
|
|
10636
10763
|
pagingGroup.appendChild(leftPageElement);
|
|
10637
10764
|
pagingGroup.appendChild(rightPageElement);
|
|
@@ -11369,13 +11496,13 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
11369
11496
|
break;
|
|
11370
11497
|
}
|
|
11371
11498
|
if ((legend.height || legend.width) && legend.mode !== 'Interactive') {
|
|
11372
|
-
map.totalRect = totalRect;
|
|
11499
|
+
this.legendTotalRect = map.totalRect = totalRect;
|
|
11373
11500
|
}
|
|
11374
11501
|
else {
|
|
11375
11502
|
if ((legend.height || legend.width) && legend.mode === 'Interactive') {
|
|
11376
11503
|
map.totalRect = totalRect;
|
|
11377
11504
|
}
|
|
11378
|
-
map.mapAreaRect = totalRect;
|
|
11505
|
+
this.legendTotalRect = map.mapAreaRect = totalRect;
|
|
11379
11506
|
}
|
|
11380
11507
|
this.translate = new Point(x, y);
|
|
11381
11508
|
}
|
|
@@ -12250,14 +12377,7 @@ var Highlight = /** @__PURE__ @class */ (function () {
|
|
|
12250
12377
|
this.highlightSettings = this.maps.layers[layerIndex].navigationLineSettings[index].highlightSettings;
|
|
12251
12378
|
}
|
|
12252
12379
|
if (this.highlightSettings.enable) {
|
|
12253
|
-
|
|
12254
|
-
this.maps.legendModule.shapeHighLightAndSelection(targetEle, data, this.highlightSettings, 'highlight', layerIndex);
|
|
12255
|
-
}
|
|
12256
|
-
var selectHighLight = targetEle.id.indexOf('shapeIndex') > -1 && this.maps.legendSettings.visible ?
|
|
12257
|
-
this.maps.legendModule.shapeToggled : true;
|
|
12258
|
-
if (selectHighLight) {
|
|
12259
|
-
this.mapHighlight(targetEle, shapeData, data);
|
|
12260
|
-
}
|
|
12380
|
+
this.handleHighlight(targetEle, layerIndex, data, shapeData);
|
|
12261
12381
|
}
|
|
12262
12382
|
else {
|
|
12263
12383
|
var element = document.getElementsByClassName('highlightMapStyle')[0];
|
|
@@ -12281,21 +12401,35 @@ var Highlight = /** @__PURE__ @class */ (function () {
|
|
|
12281
12401
|
targetEle.setAttribute('stroke', this.maps.layers[layerIndex].navigationLineSettings[index].color);
|
|
12282
12402
|
}
|
|
12283
12403
|
removeClass(targetEle);
|
|
12284
|
-
if (this.maps.legendSettings.visible) {
|
|
12404
|
+
if (this.maps.legendSettings.visible && this.maps.legendModule) {
|
|
12285
12405
|
this.maps.legendModule.removeShapeHighlightCollection();
|
|
12286
12406
|
}
|
|
12287
12407
|
}
|
|
12288
12408
|
else if ((targetEle.id.indexOf(this.maps.element.id + '_Legend_Shape_Index') !== -1 ||
|
|
12289
|
-
targetEle.id.indexOf(this.maps.element.id + '_Legend_Index') !== -1) &&
|
|
12409
|
+
targetEle.id.indexOf(this.maps.element.id + '_Legend_Index') !== -1) && this.maps.legendModule &&
|
|
12290
12410
|
this.maps.legendSettings.visible && targetEle.id.indexOf('_Text') === -1) {
|
|
12291
12411
|
this.maps.legendModule.legendHighLightAndSelection(targetEle, 'highlight');
|
|
12292
12412
|
}
|
|
12293
12413
|
else {
|
|
12294
|
-
if (this.maps.legendSettings.visible) {
|
|
12414
|
+
if (this.maps.legendSettings.visible && this.maps.legendModule) {
|
|
12295
12415
|
this.maps.legendModule.removeLegendHighlightCollection();
|
|
12296
12416
|
}
|
|
12297
12417
|
}
|
|
12298
12418
|
};
|
|
12419
|
+
/**
|
|
12420
|
+
* @private
|
|
12421
|
+
*/
|
|
12422
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
12423
|
+
Highlight.prototype.handleHighlight = function (targetElement, layerIndex, data, shapeData) {
|
|
12424
|
+
if (this.maps.legendSettings.visible && targetElement.id.indexOf('_MarkerIndex_') === -1 && this.maps.legendModule) {
|
|
12425
|
+
this.maps.legendModule.shapeHighLightAndSelection(targetElement, data, this.highlightSettings, 'highlight', layerIndex);
|
|
12426
|
+
}
|
|
12427
|
+
var selectHighLight = targetElement.id.indexOf('shapeIndex') > -1 && (this.maps.legendSettings.visible && this.maps.legendModule) ?
|
|
12428
|
+
this.maps.legendModule.shapeToggled : true;
|
|
12429
|
+
if (selectHighLight) {
|
|
12430
|
+
this.mapHighlight(targetElement, shapeData, data);
|
|
12431
|
+
}
|
|
12432
|
+
};
|
|
12299
12433
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
12300
12434
|
Highlight.prototype.mapHighlight = function (targetEle, shapeData, data) {
|
|
12301
12435
|
var _this = this;
|
|
@@ -12454,24 +12588,31 @@ var Selection = /** @__PURE__ @class */ (function () {
|
|
|
12454
12588
|
this.selectionType = 'navigationline';
|
|
12455
12589
|
}
|
|
12456
12590
|
if (this.selectionsettings.enable) {
|
|
12457
|
-
this.
|
|
12458
|
-
if (this.maps.legendSettings.visible && targetElement.id.indexOf('_MarkerIndex_') === -1) {
|
|
12459
|
-
this.maps.legendModule.shapeHighLightAndSelection(targetElement, data, this.selectionsettings, 'selection', layerIndex);
|
|
12460
|
-
}
|
|
12461
|
-
var shapeToggled = (targetElement.id.indexOf('shapeIndex') > -1 && this.maps.legendSettings.visible) ?
|
|
12462
|
-
this.maps.legendModule.shapeToggled : true;
|
|
12463
|
-
if (shapeToggled) {
|
|
12464
|
-
this.selectMap(targetElement, shapeData, data);
|
|
12465
|
-
}
|
|
12591
|
+
this.selectElement(targetElement, layerIndex, data, shapeData);
|
|
12466
12592
|
}
|
|
12467
12593
|
}
|
|
12468
|
-
else if (this.maps.legendSettings.visible && !this.maps.legendSettings.toggleLegendSettings.enable &&
|
|
12594
|
+
else if ((this.maps.legendSettings.visible && !this.maps.legendSettings.toggleLegendSettings.enable && this.maps.legendModule) &&
|
|
12469
12595
|
!isNullOrUndefined(targetElement.id) && targetElement.id.indexOf('_Text') === -1 &&
|
|
12470
12596
|
(targetElement.id.indexOf(this.maps.element.id + '_Legend_Shape_Index') > -1 ||
|
|
12471
12597
|
targetElement.id.indexOf(this.maps.element.id + '_Legend_Index') !== -1)) {
|
|
12472
12598
|
this.maps.legendModule.legendHighLightAndSelection(targetElement, 'selection');
|
|
12473
12599
|
}
|
|
12474
12600
|
};
|
|
12601
|
+
/**
|
|
12602
|
+
* @private
|
|
12603
|
+
*/
|
|
12604
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
12605
|
+
Selection.prototype.selectElement = function (targetElement, layerIndex, data, shapeData) {
|
|
12606
|
+
this.maps.mapSelect = targetElement ? true : false;
|
|
12607
|
+
if (this.maps.legendModule && this.maps.legendSettings.visible && targetElement.id.indexOf('_MarkerIndex_') === -1) {
|
|
12608
|
+
this.maps.legendModule.shapeHighLightAndSelection(targetElement, data, this.selectionsettings, 'selection', layerIndex);
|
|
12609
|
+
}
|
|
12610
|
+
var shapeToggled = (targetElement.id.indexOf('shapeIndex') > -1 && this.maps.legendSettings.visible && this.maps.legendModule) ?
|
|
12611
|
+
this.maps.legendModule.shapeToggled : true;
|
|
12612
|
+
if (shapeToggled) {
|
|
12613
|
+
this.selectMap(targetElement, shapeData, data);
|
|
12614
|
+
}
|
|
12615
|
+
};
|
|
12475
12616
|
// eslint-disable-next-line valid-jsdoc
|
|
12476
12617
|
/**
|
|
12477
12618
|
* Public method for selection
|
|
@@ -13857,6 +13998,9 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
13857
13998
|
}
|
|
13858
13999
|
}
|
|
13859
14000
|
};
|
|
14001
|
+
/**
|
|
14002
|
+
* @private
|
|
14003
|
+
*/
|
|
13860
14004
|
Zoom.prototype.panning = function (direction, xDifference, yDifference, mouseLocation) {
|
|
13861
14005
|
var map = this.maps;
|
|
13862
14006
|
var panArgs;
|
|
@@ -13875,6 +14019,8 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
13875
14019
|
yDifference = !isNullOrUndefined(yDifference) ? yDifference : (down.y - move.y);
|
|
13876
14020
|
this.maps.mergeCluster();
|
|
13877
14021
|
if (!map.isTileMap) {
|
|
14022
|
+
var legendElement = document.getElementById(map.element.id + '_Legend_Group');
|
|
14023
|
+
var legendHeight = !isNullOrUndefined(legendElement) ? legendElement.getClientRects()[0].height : 0;
|
|
13878
14024
|
x = translatePoint.x - xDifference / scale;
|
|
13879
14025
|
y = translatePoint.y - yDifference / scale;
|
|
13880
14026
|
var layerRect = getElementByID(map.element.id + '_Layer_Collections').getBoundingClientRect();
|
|
@@ -13882,7 +14028,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
13882
14028
|
var panningXDirection = ((xDifference < 0 ? layerRect.left <= (elementRect.left + map.mapAreaRect.x) :
|
|
13883
14029
|
((layerRect.left + layerRect.width) >= (elementRect.left + elementRect.width) + map.mapAreaRect.x + map.margin.left)));
|
|
13884
14030
|
var panningYDirection = ((yDifference < 0 ? layerRect.top <= (elementRect.top + map.mapAreaRect.y) :
|
|
13885
|
-
((layerRect.top + layerRect.height + map.margin.top) >= (elementRect.top + elementRect.height))));
|
|
14031
|
+
((layerRect.top + layerRect.height + legendHeight + map.margin.top) >= (elementRect.top + elementRect.height))));
|
|
13886
14032
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
13887
14033
|
var location_3 = this.maps.getGeoLocation(this.maps.layersCollection.length - 1, mouseLocation['layerX'], mouseLocation['layerY']);
|
|
13888
14034
|
panArgs = {
|
|
@@ -14285,8 +14431,9 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
14285
14431
|
x = (size.width - toolBarSize.width) - padding;
|
|
14286
14432
|
break;
|
|
14287
14433
|
}
|
|
14288
|
-
|
|
14289
|
-
element.style.
|
|
14434
|
+
var extraPosition = map.getExtraPosition();
|
|
14435
|
+
element.style.left = x + extraPosition.x + 'px';
|
|
14436
|
+
element.style.top = y + extraPosition.y + 'px';
|
|
14290
14437
|
var color = this.maps.zoomSettings.highlightColor || this.maps.themeStyle.zoomSelectionColor;
|
|
14291
14438
|
var css = ' .e-maps-toolbar:hover > circle { stroke:' + color + '; } .e-maps-toolbar:hover > path { fill: ' + color + ' ; stroke: ' + color + '; }' +
|
|
14292
14439
|
'.e-maps-toolbar:hover { cursor: pointer; } .e-maps-cursor-disable:hover { cursor: not-allowed; } .e-maps-panning:hover { cursor: pointer; } ' +
|