@syncfusion/ej2-maps 19.4.47 → 19.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 +8 -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 +191 -42
- package/dist/es6/ej2-maps.es2015.js.map +1 -1
- package/dist/es6/ej2-maps.es5.js +191 -42
- 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 +3 -0
- package/src/maps/maps.js +106 -9
- 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 +6 -1
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
|
*
|
|
@@ -8913,14 +9007,18 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8913
9007
|
* @private
|
|
8914
9008
|
*/
|
|
8915
9009
|
Maps.prototype.getExtraPosition = function () {
|
|
8916
|
-
var top;
|
|
8917
|
-
var left;
|
|
9010
|
+
var top = 0;
|
|
9011
|
+
var left = 0;
|
|
8918
9012
|
var svgElement = getElement(this.element.id + '_svg');
|
|
8919
9013
|
if (!isNullOrUndefined(svgElement)) {
|
|
8920
|
-
var
|
|
8921
|
-
var
|
|
8922
|
-
|
|
8923
|
-
|
|
9014
|
+
var svgClientRects = svgElement.getClientRects();
|
|
9015
|
+
var mapsClientRects = (getElement(this.element.id + '_Secondary_Element')).getClientRects();
|
|
9016
|
+
if (svgClientRects.length !== 0 && mapsClientRects.length !== 0) {
|
|
9017
|
+
var svgClientRect = svgClientRects[0];
|
|
9018
|
+
var mapsClientRect = mapsClientRects[0];
|
|
9019
|
+
top = svgClientRect.top - mapsClientRect.top;
|
|
9020
|
+
left = svgClientRect.left - mapsClientRect.left;
|
|
9021
|
+
}
|
|
8924
9022
|
}
|
|
8925
9023
|
return new Point(left, top);
|
|
8926
9024
|
};
|
|
@@ -10138,7 +10236,14 @@ var NavigationLine = /** @__PURE__ @class */ (function () {
|
|
|
10138
10236
|
*/
|
|
10139
10237
|
var Legend = /** @__PURE__ @class */ (function () {
|
|
10140
10238
|
function Legend(maps) {
|
|
10239
|
+
/**
|
|
10240
|
+
* @private
|
|
10241
|
+
*/
|
|
10141
10242
|
this.legendBorderRect = new Rect(0, 0, 0, 0);
|
|
10243
|
+
/**
|
|
10244
|
+
* @private
|
|
10245
|
+
*/
|
|
10246
|
+
this.legendTotalRect = new Rect(0, 0, 0, 0);
|
|
10142
10247
|
/**
|
|
10143
10248
|
* @private
|
|
10144
10249
|
*/
|
|
@@ -10155,12 +10260,27 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
10155
10260
|
this.textMaxWidth = 0;
|
|
10156
10261
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10157
10262
|
this.shapeHighlightCollection = [];
|
|
10263
|
+
/**
|
|
10264
|
+
* @private
|
|
10265
|
+
*/
|
|
10158
10266
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10159
10267
|
this.legendHighlightCollection = [];
|
|
10268
|
+
/**
|
|
10269
|
+
* @private
|
|
10270
|
+
*/
|
|
10160
10271
|
this.shapePreviousColor = [];
|
|
10272
|
+
/**
|
|
10273
|
+
* @private
|
|
10274
|
+
*/
|
|
10161
10275
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10162
10276
|
this.selectedNonLegendShapes = [];
|
|
10277
|
+
/**
|
|
10278
|
+
* @private
|
|
10279
|
+
*/
|
|
10163
10280
|
this.shapeToggled = true;
|
|
10281
|
+
/**
|
|
10282
|
+
* @private
|
|
10283
|
+
*/
|
|
10164
10284
|
this.legendElement = null;
|
|
10165
10285
|
this.maps = maps;
|
|
10166
10286
|
this.addEventListener();
|
|
@@ -10541,6 +10661,11 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
10541
10661
|
this.drawLegendItem(this.currentPage);
|
|
10542
10662
|
}
|
|
10543
10663
|
};
|
|
10664
|
+
/**
|
|
10665
|
+
* @param {string} page - Specifies the legend page.
|
|
10666
|
+
* @returns {void}
|
|
10667
|
+
* @private
|
|
10668
|
+
*/
|
|
10544
10669
|
Legend.prototype.drawLegendItem = function (page) {
|
|
10545
10670
|
var map = this.maps;
|
|
10546
10671
|
var legend = map.legendSettings;
|
|
@@ -10560,6 +10685,7 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
10560
10685
|
var shapeBorder = collection['shapeBorder'];
|
|
10561
10686
|
var legendElement = render.createGroup({ id: map.element.id + '_Legend_Index_' + collection['idIndex'] });
|
|
10562
10687
|
var legendText = collection['DisplayText'];
|
|
10688
|
+
var pagingArrowPadding = 4;
|
|
10563
10689
|
var shape = ((legend.type === 'Markers') ? ((isNullOrUndefined(collection['ImageSrc'])) ?
|
|
10564
10690
|
legend.shape : 'Image') : collection['legendShape']);
|
|
10565
10691
|
var strokeColor = (legend.shape === 'HorizontalLine' || legend.shape === 'VerticalLine'
|
|
@@ -10569,8 +10695,8 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
10569
10695
|
1 : shapeBorder.width : shapeBorder.width;
|
|
10570
10696
|
var shapeId = map.element.id + '_Legend_Shape_Index_' + collection['idIndex'];
|
|
10571
10697
|
var textId = map.element.id + '_Legend_Text_Index_' + collection['idIndex'];
|
|
10572
|
-
var shapeLocation = collection['Shape'];
|
|
10573
|
-
var textLocation = collection['Text'];
|
|
10698
|
+
var shapeLocation = new Point(collection['Shape']['x'], (collection['Shape']['y'] - pagingArrowPadding));
|
|
10699
|
+
var textLocation = new Point(collection['Text']['x'], (collection['Text']['y'] - pagingArrowPadding));
|
|
10574
10700
|
var imageUrl = ((isNullOrUndefined(collection['ImageSrc'])) ? legend.shape : collection['ImageSrc']);
|
|
10575
10701
|
var renderOptions_1 = new PathOption(shapeId, collection['Fill'], strokeWidth, strokeColor, legend.opacity, isNullOrUndefined(shapeBorder.opacity) ? legend.opacity : shapeBorder.opacity, '');
|
|
10576
10702
|
var legendTextStyle = {
|
|
@@ -10613,10 +10739,10 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
10613
10739
|
var pagingFont = legend.textStyle;
|
|
10614
10740
|
var pagingTextSize = measureText(pagingText, pagingFont);
|
|
10615
10741
|
var leftPageX = (this.legendItemRect.x + this.legendItemRect.width) - pagingTextSize.width -
|
|
10616
|
-
(width * 2) - spacing;
|
|
10742
|
+
(width * 2) - (spacing * 2) + (pagingArrowPadding / 2);
|
|
10617
10743
|
var rightPageX = (this.legendItemRect.x + this.legendItemRect.width);
|
|
10744
|
+
var pageTextX = rightPageX - width - (pagingTextSize.width / 2) - (spacing / 2) - pagingArrowPadding;
|
|
10618
10745
|
var locY = (this.legendItemRect.y + this.legendItemRect.height) + (height / 2) + spacing;
|
|
10619
|
-
var pageTextX = rightPageX - width - (pagingTextSize.width / 2) - (spacing / 2);
|
|
10620
10746
|
pagingGroup = render.createGroup({ id: map.element.id + '_Legend_Paging_Group' });
|
|
10621
10747
|
var leftPageElement = render.createGroup({ id: map.element.id + '_Legend_Left_Paging_Group' });
|
|
10622
10748
|
var rightPageElement = render.createGroup({ id: map.element.id + '_Legend_Right_Paging_Group' });
|
|
@@ -10624,15 +10750,19 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
10624
10750
|
' L ' + (rightPageX - width) + ' ' + (locY + height) + ' z ';
|
|
10625
10751
|
var leftPath = ' M ' + leftPageX + ' ' + locY + ' L ' + (leftPageX + width) + ' ' + (locY - height) +
|
|
10626
10752
|
' L ' + (leftPageX + width) + ' ' + (locY + height) + ' z ';
|
|
10627
|
-
var leftPageOptions = new PathOption(map.element.id + '_Left_Page', '#a6a6a6', 0, '#a6a6a6', 1, 1, '', leftPath);
|
|
10753
|
+
var leftPageOptions = new PathOption(map.element.id + '_Left_Page', '#a6a6a6', 0, '#a6a6a6', ((page + 1) === 1 ? 0.5 : 1), 1, '', leftPath);
|
|
10628
10754
|
leftPageElement.appendChild(render.drawPath(leftPageOptions));
|
|
10629
10755
|
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, '', '');
|
|
10630
|
-
|
|
10756
|
+
var pathEle = render.drawRectangle(leftRectPageOptions);
|
|
10757
|
+
pathEle.setAttribute('tabindex', ((page + 1) === 1 ? -1 : map.tabIndex + 1).toString());
|
|
10758
|
+
leftPageElement.appendChild(pathEle);
|
|
10631
10759
|
this.wireEvents(leftPageElement);
|
|
10632
|
-
var rightPageOptions = new PathOption(map.element.id + '_Right_Page', '#a6a6a6', 0, '#a6a6a6', 1, 1, '', rightPath);
|
|
10760
|
+
var rightPageOptions = new PathOption(map.element.id + '_Right_Page', '#a6a6a6', 0, '#a6a6a6', ((page + 1) === this.totalPages.length ? 0.5 : 1), 1, '', rightPath);
|
|
10633
10761
|
rightPageElement.appendChild(render.drawPath(rightPageOptions));
|
|
10634
|
-
var rightRectPageOptions = new RectOption(map.element.id + '_Right_Page_Rect', 'transparent', {}, 1, new Rect(
|
|
10635
|
-
|
|
10762
|
+
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, '', '');
|
|
10763
|
+
pathEle = render.drawRectangle(rightRectPageOptions);
|
|
10764
|
+
pathEle.setAttribute('tabindex', ((page + 1) === this.totalPages.length ? -1 : map.tabIndex + 2).toString());
|
|
10765
|
+
rightPageElement.appendChild(pathEle);
|
|
10636
10766
|
this.wireEvents(rightPageElement);
|
|
10637
10767
|
pagingGroup.appendChild(leftPageElement);
|
|
10638
10768
|
pagingGroup.appendChild(rightPageElement);
|
|
@@ -11370,13 +11500,13 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
11370
11500
|
break;
|
|
11371
11501
|
}
|
|
11372
11502
|
if ((legend.height || legend.width) && legend.mode !== 'Interactive') {
|
|
11373
|
-
map.totalRect = totalRect;
|
|
11503
|
+
this.legendTotalRect = map.totalRect = totalRect;
|
|
11374
11504
|
}
|
|
11375
11505
|
else {
|
|
11376
11506
|
if ((legend.height || legend.width) && legend.mode === 'Interactive') {
|
|
11377
11507
|
map.totalRect = totalRect;
|
|
11378
11508
|
}
|
|
11379
|
-
map.mapAreaRect = totalRect;
|
|
11509
|
+
this.legendTotalRect = map.mapAreaRect = totalRect;
|
|
11380
11510
|
}
|
|
11381
11511
|
this.translate = new Point(x, y);
|
|
11382
11512
|
}
|
|
@@ -12251,14 +12381,7 @@ var Highlight = /** @__PURE__ @class */ (function () {
|
|
|
12251
12381
|
this.highlightSettings = this.maps.layers[layerIndex].navigationLineSettings[index].highlightSettings;
|
|
12252
12382
|
}
|
|
12253
12383
|
if (this.highlightSettings.enable) {
|
|
12254
|
-
|
|
12255
|
-
this.maps.legendModule.shapeHighLightAndSelection(targetEle, data, this.highlightSettings, 'highlight', layerIndex);
|
|
12256
|
-
}
|
|
12257
|
-
var selectHighLight = targetEle.id.indexOf('shapeIndex') > -1 && this.maps.legendSettings.visible ?
|
|
12258
|
-
this.maps.legendModule.shapeToggled : true;
|
|
12259
|
-
if (selectHighLight) {
|
|
12260
|
-
this.mapHighlight(targetEle, shapeData, data);
|
|
12261
|
-
}
|
|
12384
|
+
this.handleHighlight(targetEle, layerIndex, data, shapeData);
|
|
12262
12385
|
}
|
|
12263
12386
|
else {
|
|
12264
12387
|
var element = document.getElementsByClassName('highlightMapStyle')[0];
|
|
@@ -12282,21 +12405,35 @@ var Highlight = /** @__PURE__ @class */ (function () {
|
|
|
12282
12405
|
targetEle.setAttribute('stroke', this.maps.layers[layerIndex].navigationLineSettings[index].color);
|
|
12283
12406
|
}
|
|
12284
12407
|
removeClass(targetEle);
|
|
12285
|
-
if (this.maps.legendSettings.visible) {
|
|
12408
|
+
if (this.maps.legendSettings.visible && this.maps.legendModule) {
|
|
12286
12409
|
this.maps.legendModule.removeShapeHighlightCollection();
|
|
12287
12410
|
}
|
|
12288
12411
|
}
|
|
12289
12412
|
else if ((targetEle.id.indexOf(this.maps.element.id + '_Legend_Shape_Index') !== -1 ||
|
|
12290
|
-
targetEle.id.indexOf(this.maps.element.id + '_Legend_Index') !== -1) &&
|
|
12413
|
+
targetEle.id.indexOf(this.maps.element.id + '_Legend_Index') !== -1) && this.maps.legendModule &&
|
|
12291
12414
|
this.maps.legendSettings.visible && targetEle.id.indexOf('_Text') === -1) {
|
|
12292
12415
|
this.maps.legendModule.legendHighLightAndSelection(targetEle, 'highlight');
|
|
12293
12416
|
}
|
|
12294
12417
|
else {
|
|
12295
|
-
if (this.maps.legendSettings.visible) {
|
|
12418
|
+
if (this.maps.legendSettings.visible && this.maps.legendModule) {
|
|
12296
12419
|
this.maps.legendModule.removeLegendHighlightCollection();
|
|
12297
12420
|
}
|
|
12298
12421
|
}
|
|
12299
12422
|
};
|
|
12423
|
+
/**
|
|
12424
|
+
* @private
|
|
12425
|
+
*/
|
|
12426
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
12427
|
+
Highlight.prototype.handleHighlight = function (targetElement, layerIndex, data, shapeData) {
|
|
12428
|
+
if (this.maps.legendSettings.visible && targetElement.id.indexOf('_MarkerIndex_') === -1 && this.maps.legendModule) {
|
|
12429
|
+
this.maps.legendModule.shapeHighLightAndSelection(targetElement, data, this.highlightSettings, 'highlight', layerIndex);
|
|
12430
|
+
}
|
|
12431
|
+
var selectHighLight = targetElement.id.indexOf('shapeIndex') > -1 && (this.maps.legendSettings.visible && this.maps.legendModule) ?
|
|
12432
|
+
this.maps.legendModule.shapeToggled : true;
|
|
12433
|
+
if (selectHighLight) {
|
|
12434
|
+
this.mapHighlight(targetElement, shapeData, data);
|
|
12435
|
+
}
|
|
12436
|
+
};
|
|
12300
12437
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
12301
12438
|
Highlight.prototype.mapHighlight = function (targetEle, shapeData, data) {
|
|
12302
12439
|
var _this = this;
|
|
@@ -12455,24 +12592,31 @@ var Selection = /** @__PURE__ @class */ (function () {
|
|
|
12455
12592
|
this.selectionType = 'navigationline';
|
|
12456
12593
|
}
|
|
12457
12594
|
if (this.selectionsettings.enable) {
|
|
12458
|
-
this.
|
|
12459
|
-
if (this.maps.legendSettings.visible && targetElement.id.indexOf('_MarkerIndex_') === -1) {
|
|
12460
|
-
this.maps.legendModule.shapeHighLightAndSelection(targetElement, data, this.selectionsettings, 'selection', layerIndex);
|
|
12461
|
-
}
|
|
12462
|
-
var shapeToggled = (targetElement.id.indexOf('shapeIndex') > -1 && this.maps.legendSettings.visible) ?
|
|
12463
|
-
this.maps.legendModule.shapeToggled : true;
|
|
12464
|
-
if (shapeToggled) {
|
|
12465
|
-
this.selectMap(targetElement, shapeData, data);
|
|
12466
|
-
}
|
|
12595
|
+
this.selectElement(targetElement, layerIndex, data, shapeData);
|
|
12467
12596
|
}
|
|
12468
12597
|
}
|
|
12469
|
-
else if (this.maps.legendSettings.visible && !this.maps.legendSettings.toggleLegendSettings.enable &&
|
|
12598
|
+
else if ((this.maps.legendSettings.visible && !this.maps.legendSettings.toggleLegendSettings.enable && this.maps.legendModule) &&
|
|
12470
12599
|
!isNullOrUndefined(targetElement.id) && targetElement.id.indexOf('_Text') === -1 &&
|
|
12471
12600
|
(targetElement.id.indexOf(this.maps.element.id + '_Legend_Shape_Index') > -1 ||
|
|
12472
12601
|
targetElement.id.indexOf(this.maps.element.id + '_Legend_Index') !== -1)) {
|
|
12473
12602
|
this.maps.legendModule.legendHighLightAndSelection(targetElement, 'selection');
|
|
12474
12603
|
}
|
|
12475
12604
|
};
|
|
12605
|
+
/**
|
|
12606
|
+
* @private
|
|
12607
|
+
*/
|
|
12608
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
12609
|
+
Selection.prototype.selectElement = function (targetElement, layerIndex, data, shapeData) {
|
|
12610
|
+
this.maps.mapSelect = targetElement ? true : false;
|
|
12611
|
+
if (this.maps.legendModule && this.maps.legendSettings.visible && targetElement.id.indexOf('_MarkerIndex_') === -1) {
|
|
12612
|
+
this.maps.legendModule.shapeHighLightAndSelection(targetElement, data, this.selectionsettings, 'selection', layerIndex);
|
|
12613
|
+
}
|
|
12614
|
+
var shapeToggled = (targetElement.id.indexOf('shapeIndex') > -1 && this.maps.legendSettings.visible && this.maps.legendModule) ?
|
|
12615
|
+
this.maps.legendModule.shapeToggled : true;
|
|
12616
|
+
if (shapeToggled) {
|
|
12617
|
+
this.selectMap(targetElement, shapeData, data);
|
|
12618
|
+
}
|
|
12619
|
+
};
|
|
12476
12620
|
// eslint-disable-next-line valid-jsdoc
|
|
12477
12621
|
/**
|
|
12478
12622
|
* Public method for selection
|
|
@@ -13858,6 +14002,9 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
13858
14002
|
}
|
|
13859
14003
|
}
|
|
13860
14004
|
};
|
|
14005
|
+
/**
|
|
14006
|
+
* @private
|
|
14007
|
+
*/
|
|
13861
14008
|
Zoom.prototype.panning = function (direction, xDifference, yDifference, mouseLocation) {
|
|
13862
14009
|
var map = this.maps;
|
|
13863
14010
|
var panArgs;
|
|
@@ -13876,6 +14023,8 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
13876
14023
|
yDifference = !isNullOrUndefined(yDifference) ? yDifference : (down.y - move.y);
|
|
13877
14024
|
this.maps.mergeCluster();
|
|
13878
14025
|
if (!map.isTileMap) {
|
|
14026
|
+
var legendElement = document.getElementById(map.element.id + '_Legend_Group');
|
|
14027
|
+
var legendHeight = !isNullOrUndefined(legendElement) ? legendElement.getClientRects()[0].height : 0;
|
|
13879
14028
|
x = translatePoint.x - xDifference / scale;
|
|
13880
14029
|
y = translatePoint.y - yDifference / scale;
|
|
13881
14030
|
var layerRect = getElementByID(map.element.id + '_Layer_Collections').getBoundingClientRect();
|
|
@@ -13883,7 +14032,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
13883
14032
|
var panningXDirection = ((xDifference < 0 ? layerRect.left <= (elementRect.left + map.mapAreaRect.x) :
|
|
13884
14033
|
((layerRect.left + layerRect.width) >= (elementRect.left + elementRect.width) + map.mapAreaRect.x + map.margin.left)));
|
|
13885
14034
|
var panningYDirection = ((yDifference < 0 ? layerRect.top <= (elementRect.top + map.mapAreaRect.y) :
|
|
13886
|
-
((layerRect.top + layerRect.height + map.margin.top) >= (elementRect.top + elementRect.height))));
|
|
14035
|
+
((layerRect.top + layerRect.height + legendHeight + map.margin.top) >= (elementRect.top + elementRect.height))));
|
|
13887
14036
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
13888
14037
|
var location_3 = this.maps.getGeoLocation(this.maps.layersCollection.length - 1, mouseLocation['layerX'], mouseLocation['layerY']);
|
|
13889
14038
|
panArgs = {
|