@syncfusion/ej2-maps 21.1.38 → 21.2.3

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.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 21.1.38
3
+ * version : 21.2.3
4
4
  * Copyright Syncfusion Inc. 2001 - 2020. All rights reserved.
5
5
  * Use of this code is subject to the terms of our license.
6
6
  * A copy of the current license can be obtained at any time by e-mailing
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "_from": "@syncfusion/ej2-maps@*",
3
- "_id": "@syncfusion/ej2-maps@21.1.37",
3
+ "_id": "@syncfusion/ej2-maps@21.1.41",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-kiEbYLCUj/kG9AVYrexeCBZ0Yg4rznGKcP5wFBnrUG1K5gav6HykaAmesmAVUI12GYQbpooIIFT32Mdg4WitjQ==",
5
+ "_integrity": "sha512-wrk5UgYw27d3sQCC9Kp/O1U8oPFsQQi0RYg9FX5PTDYEiAVTB5iWS4dmFivYA2lm3STY1Sy5Emzcn8J9S60J3Q==",
6
6
  "_location": "/@syncfusion/ej2-maps",
7
7
  "_phantomChildren": {},
8
8
  "_requested": {
@@ -18,13 +18,10 @@
18
18
  },
19
19
  "_requiredBy": [
20
20
  "/",
21
- "/@syncfusion/ej2",
22
- "/@syncfusion/ej2-angular-maps",
23
- "/@syncfusion/ej2-react-maps",
24
- "/@syncfusion/ej2-vue-maps"
21
+ "/@syncfusion/ej2"
25
22
  ],
26
- "_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-maps/-/ej2-maps-21.1.37.tgz",
27
- "_shasum": "ba6ed04fdeab53b86e57e1b92df1d5c0dfab816b",
23
+ "_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-maps/-/ej2-maps-21.1.41.tgz",
24
+ "_shasum": "4681f7e84b378e0caf1bf67faa220146bd4ed7ed",
28
25
  "_spec": "@syncfusion/ej2-maps@*",
29
26
  "_where": "/jenkins/workspace/elease-automation_release_21.1.1/packages/included",
30
27
  "author": {
@@ -35,13 +32,13 @@
35
32
  },
36
33
  "bundleDependencies": false,
37
34
  "dependencies": {
38
- "@syncfusion/ej2-base": "~21.1.38",
39
- "@syncfusion/ej2-buttons": "~21.1.37",
40
- "@syncfusion/ej2-compression": "~21.1.37",
41
- "@syncfusion/ej2-data": "~21.1.38",
42
- "@syncfusion/ej2-file-utils": "~21.1.37",
43
- "@syncfusion/ej2-pdf-export": "~21.1.37",
44
- "@syncfusion/ej2-svg-base": "~21.1.38"
35
+ "@syncfusion/ej2-base": "~21.2.3",
36
+ "@syncfusion/ej2-buttons": "~21.2.3",
37
+ "@syncfusion/ej2-compression": "~21.2.3",
38
+ "@syncfusion/ej2-data": "~21.2.3",
39
+ "@syncfusion/ej2-file-utils": "~21.2.3",
40
+ "@syncfusion/ej2-pdf-export": "~21.2.3",
41
+ "@syncfusion/ej2-svg-base": "~21.2.3"
45
42
  },
46
43
  "deprecated": false,
47
44
  "description": "The Maps component is used to visualize the geographical data and represent the statistical data of a particular geographical area on earth with user interactivity, and provides various customizing options",
@@ -93,6 +90,6 @@
93
90
  "url": "git+https://github.com/syncfusion/ej2-javascript-ui-controls.git"
94
91
  },
95
92
  "typings": "index.d.ts",
96
- "version": "21.1.38",
93
+ "version": "21.2.3",
97
94
  "sideEffects": false
98
95
  }
@@ -798,6 +798,7 @@ export declare class Maps extends Component<HTMLElement> implements INotifyPrope
798
798
  * @returns {void}
799
799
  */
800
800
  private addTabIndex;
801
+ private setSecondaryElementPosition;
801
802
  private zoomingChange;
802
803
  private createSecondaryElement;
803
804
  /**
@@ -1078,13 +1079,6 @@ export declare class Maps extends Component<HTMLElement> implements INotifyPrope
1078
1079
  * @returns {boolean} - Returns whether the navigation lines are visible or not.
1079
1080
  */
1080
1081
  private isNavigationVisible;
1081
- /**
1082
- * To find space between the secondary element and svg element.
1083
- *
1084
- * @returns {Point} - Returns the left and top value of the secondary element of Maps.
1085
- * @private
1086
- */
1087
- getExtraPosition(): Point;
1088
1082
  /**
1089
1083
  * To find marker visibility
1090
1084
  */
package/src/maps/maps.js CHANGED
@@ -398,15 +398,8 @@ var Maps = /** @class */ (function (_super) {
398
398
  if (!isNullOrUndefined(this.svgObject)) {
399
399
  this.element.appendChild(this.svgObject);
400
400
  }
401
- var position = this.getExtraPosition();
401
+ this.setSecondaryElementPosition();
402
402
  for (var i = 0; i < this.layers.length; i++) {
403
- if (position.x !== 0 || position.y !== 0) {
404
- var markerTemplate = document.getElementById(this.element.id + '_LayerIndex_' + i + '_Markers_Template_Group');
405
- if (!isNullOrUndefined(markerTemplate)) {
406
- markerTemplate.style.top = this.mapAreaRect.y + position.y + 'px';
407
- markerTemplate.style.left = this.mapAreaRect.x + position.x + 'px';
408
- }
409
- }
410
403
  if (this.layers[i].selectionSettings && this.layers[i].selectionSettings.enable &&
411
404
  this.layers[i].initialShapeSelection.length > 0 && this.checkInitialRender) {
412
405
  var checkSelection = this.layers[i].selectionSettings.enableMultiSelect;
@@ -596,15 +589,13 @@ var Maps = /** @class */ (function (_super) {
596
589
  this.element.setAttribute('role', '');
597
590
  this.element.tabIndex = this.tabIndex;
598
591
  };
599
- // private setSecondaryElementPosition(): void {
600
- // if (!this.isTileMap) {
601
- // let element: HTMLDivElement = getElementByID(this.element.id + '_Secondary_Element') as HTMLDivElement;
602
- // let rect: ClientRect = this.element.getBoundingClientRect();
603
- // let svgRect: ClientRect = getElementByID(this.element.id + '_svg').getBoundingClientRect();
604
- // element.style.marginLeft = Math.max(svgRect.left - rect.left, 0) + 'px';
605
- // element.style.marginTop = Math.max(svgRect.top - rect.top, 0) + 'px';
606
- // }
607
- // }
592
+ Maps.prototype.setSecondaryElementPosition = function () {
593
+ var element = getElementByID(this.element.id + '_Secondary_Element');
594
+ var rect = this.element.getBoundingClientRect();
595
+ var svgRect = getElementByID(this.element.id + '_svg').getBoundingClientRect();
596
+ element.style.marginLeft = Math.max(svgRect.left - rect.left, 0) + 'px';
597
+ element.style.marginTop = Math.max(svgRect.top - rect.top, 0) + 'px';
598
+ };
608
599
  Maps.prototype.zoomingChange = function () {
609
600
  var left;
610
601
  var top;
@@ -2225,28 +2216,6 @@ var Maps = /** @class */ (function (_super) {
2225
2216
  });
2226
2217
  return isVisible;
2227
2218
  };
2228
- /**
2229
- * To find space between the secondary element and svg element.
2230
- *
2231
- * @returns {Point} - Returns the left and top value of the secondary element of Maps.
2232
- * @private
2233
- */
2234
- Maps.prototype.getExtraPosition = function () {
2235
- var top = 0;
2236
- var left = 0;
2237
- var svgElement = getElement(this.element.id + '_svg');
2238
- if (!isNullOrUndefined(svgElement)) {
2239
- var svgClientRects = svgElement.getClientRects();
2240
- var mapsClientRects = (getElement(this.element.id + '_Secondary_Element')).getClientRects();
2241
- if (svgClientRects.length !== 0 && mapsClientRects.length !== 0) {
2242
- var svgClientRect = svgClientRects[0];
2243
- var mapsClientRect = mapsClientRects[0];
2244
- top = svgClientRect.top - mapsClientRect.top;
2245
- left = svgClientRect.left - mapsClientRect.left;
2246
- }
2247
- }
2248
- return new Point(left, top);
2249
- };
2250
2219
  /**
2251
2220
  * To find marker visibility
2252
2221
  */
@@ -1553,9 +1553,8 @@ var Zoom = /** @class */ (function () {
1553
1553
  }
1554
1554
  break;
1555
1555
  }
1556
- var extraPosition = map.getExtraPosition();
1557
- element.style.left = x + extraPosition.x + 'px';
1558
- element.style.top = y + extraPosition.y + 'px';
1556
+ element.style.left = x + 'px';
1557
+ element.style.top = y + 'px';
1559
1558
  var color = this.maps.toolbarProperties.highlightColor || this.maps.themeStyle.zoomSelectionColor;
1560
1559
  var css = ' .e-maps-toolbar:hover > circle { stroke:' + color + '; } .e-maps-toolbar:hover > path { fill: ' + color + ' ; stroke: ' + color + '; }' +
1561
1560
  '.e-maps-toolbar:hover { cursor: pointer; } .e-maps-cursor-disable:hover { cursor: not-allowed; } .e-maps-panning:hover { cursor: pointer; } ' +
@@ -56,6 +56,7 @@ export function stringToNumber(value, containerSize) {
56
56
  export function calculateSize(maps) {
57
57
  maps.element.style.height = !isNullOrUndefined(maps.height) ? maps.height : 'auto';
58
58
  maps.element.style.width = !isNullOrUndefined(maps.width) ? maps.width : 'auto';
59
+ maps.element.style.setProperty("display", "block");
59
60
  var containerWidth = maps.element.clientWidth;
60
61
  var containerHeight = maps.element.clientHeight;
61
62
  var containerElementWidth = stringToNumber(maps.element.style.width, containerWidth);
@@ -1852,8 +1853,9 @@ export function findMidPointOfPolygon(points, type, geometryType) {
1852
1853
  ySum = ySum + Math.abs(((startY + startY1) * (((startX * startY1) - (startX1 * startY)))));
1853
1854
  }
1854
1855
  sum = 0.5 * sum;
1855
- xSum = (1 / (4 * sum)) * xSum;
1856
- ySum = (1 / (4 * sum)) * ySum;
1856
+ var pointValue = points.some(function (point) { return point.x < 5 && point.y < 5; }) && geometryType === 'Normal' ? 6 : 4;
1857
+ xSum = (1 / (pointValue * sum)) * xSum;
1858
+ ySum = (1 / (pointValue * sum)) * ySum;
1857
1859
  /* Code for finding nearest points in polygon related to midPoint*/
1858
1860
  var rightMinPoint = { x: 0, y: 0 };
1859
1861
  var rightMaxPoint = { x: 0, y: 0 };