egovamap 0.28.8 → 0.28.9

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.
@@ -172,7 +172,9 @@ XScene.prototype = {
172
172
  };
173
173
 
174
174
  XScene.create = function (pageType, pageId) {
175
- window.__xsense = new XScene(pageType, pageId);
175
+ if(!window.__xsense){
176
+ window.__xsense = new XScene(pageType, pageId);
177
+ }
176
178
  return window.__xsense;
177
179
  };
178
180
 
@@ -12,18 +12,20 @@ import GeometryTrans from "./GeometryTrans";
12
12
  var defaultMapID = null;
13
13
  var mapList = {};
14
14
  var mapArray = [];
15
- var mapCount = 0;
16
15
  var scene = null;
17
16
 
17
+ function getUid() {
18
+ return new Date().getTime() + Math.random().toString(36).substring(2);
19
+ }
20
+
18
21
  function getUniqueID(container) {
19
22
  var uniqueID = null;
20
23
  if (container == undefined || container == null || container == "")
21
24
  return undefined;
22
25
  uniqueID = container.uniqueID;
23
26
  if (!uniqueID) {
24
- uniqueID = "egovamappage" + mapCount;
27
+ uniqueID = "egovamap" + getUid();
25
28
  container.uniqueID = uniqueID;
26
- mapCount++;
27
29
  }
28
30
  return uniqueID;
29
31
  }
@@ -5236,6 +5238,7 @@ var EGovaMapUtils = {
5236
5238
  for (var k in window.__xsense._evt.handlers) {
5237
5239
  if (k.startsWith(uniqueID)) {
5238
5240
  window.__xsense._evt.handlers[k] = null;
5241
+ delete window.__xsense._evt.handlers[k];
5239
5242
  }
5240
5243
  }
5241
5244
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "egovamap",
3
- "version": "0.28.8",
3
+ "version": "0.28.9",
4
4
  "description": "eUrbanGIS SDK",
5
5
  "main": "index.js",
6
6
  "scripts": {