@mint-ui/map 0.3.2-beta → 0.3.4-beta

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.
@@ -272,9 +272,11 @@ var GoogleMintMapController = function (_super) {
272
272
  GoogleMintMapController.prototype.clearDrawable = function (drawable) {
273
273
  if (drawable && drawable.native) {
274
274
  if (drawable.native instanceof google.maps.Marker || drawable.native instanceof google.maps.Polygon || drawable.native instanceof google.maps.Polyline) {
275
+ google.maps.event.clearInstanceListeners(drawable.native);
275
276
  drawable.native.setMap(null);
276
277
  return true;
277
278
  } else if (drawable.native instanceof google.maps.marker.AdvancedMarkerView) {
279
+ google.maps.event.clearInstanceListeners(drawable.native);
278
280
  drawable.native.map = null;
279
281
  return true;
280
282
  }
@@ -387,6 +389,7 @@ var GoogleMintMapController = function (_super) {
387
389
  gestureHandling: 'greedy',
388
390
  clickableIcons: false
389
391
  });
392
+ this.map = map;
390
393
  map.addListener('idle', function () {
391
394
  _this.checkBoundsChangeThrottleTime() && _this.mapProps.onBoundsChanged && _this.mapProps.onBoundsChanged(_this.getCurrBounds());
392
395
  });
@@ -407,7 +410,6 @@ var GoogleMintMapController = function (_super) {
407
410
 
408
411
  _this.mapProps.onMouseMove(pos);
409
412
  });
410
- this.map = map;
411
413
  this.mapInitialized = true;
412
414
  console.log("".concat(this.type, " map script initialized"), divElement);
413
415
  resolve(map);
@@ -277,9 +277,6 @@ var NaverMintMapController = function (_super) {
277
277
  if (drawable.native instanceof naver.maps.Marker) {
278
278
  if (this.mapProps.markerCache && this.markerPool) {
279
279
  drawable.native.setVisible(false);
280
- this.markerEvents.map(function (eName) {
281
- drawable.native.clearListeners(eName);
282
- });
283
280
  (_a = this.markerPool) === null || _a === void 0 ? void 0 : _a.releasePoolItem(drawable.native);
284
281
  } else {
285
282
  drawable.native.setMap(null);
@@ -288,6 +285,7 @@ var NaverMintMapController = function (_super) {
288
285
  drawable.native.setMap(null);
289
286
  }
290
287
 
288
+ naver.maps.Event.clearInstanceListeners(drawable.native);
291
289
  return true;
292
290
  }
293
291
 
@@ -415,6 +413,7 @@ var NaverMintMapController = function (_super) {
415
413
  options.minZoom = minZoom;
416
414
  options.maxZoom = maxZoom;
417
415
  map = new naver.maps.Map(divElement, options);
416
+ this.map = map;
418
417
  map.addListener('dragstart', function (e) {
419
418
  _this.dragStartPoint[0] = e.domEvent.clientX;
420
419
  _this.dragStartPoint[1] = e.domEvent.clientY;
@@ -446,11 +445,11 @@ var NaverMintMapController = function (_super) {
446
445
 
447
446
  _this.mapProps.onMouseMove(pos);
448
447
  });
449
- this.map = map;
450
448
  this.mapInitialized = true;
451
449
  this.initMarkerPool();
452
450
  console.log("".concat(this.type, " map script initialized"), divElement);
453
451
  resolve(map);
452
+ map.trigger('idle');
454
453
  return [2];
455
454
  }
456
455
  });
package/dist/index.es.js CHANGED
@@ -674,9 +674,6 @@ var NaverMintMapController = function (_super) {
674
674
  if (drawable.native instanceof naver.maps.Marker) {
675
675
  if (this.mapProps.markerCache && this.markerPool) {
676
676
  drawable.native.setVisible(false);
677
- this.markerEvents.map(function (eName) {
678
- drawable.native.clearListeners(eName);
679
- });
680
677
  (_a = this.markerPool) === null || _a === void 0 ? void 0 : _a.releasePoolItem(drawable.native);
681
678
  } else {
682
679
  drawable.native.setMap(null);
@@ -685,6 +682,7 @@ var NaverMintMapController = function (_super) {
685
682
  drawable.native.setMap(null);
686
683
  }
687
684
 
685
+ naver.maps.Event.clearInstanceListeners(drawable.native);
688
686
  return true;
689
687
  }
690
688
 
@@ -812,6 +810,7 @@ var NaverMintMapController = function (_super) {
812
810
  options.minZoom = minZoom;
813
811
  options.maxZoom = maxZoom;
814
812
  map = new naver.maps.Map(divElement, options);
813
+ this.map = map;
815
814
  map.addListener('dragstart', function (e) {
816
815
  _this.dragStartPoint[0] = e.domEvent.clientX;
817
816
  _this.dragStartPoint[1] = e.domEvent.clientY;
@@ -843,11 +842,11 @@ var NaverMintMapController = function (_super) {
843
842
 
844
843
  _this.mapProps.onMouseMove(pos);
845
844
  });
846
- this.map = map;
847
845
  this.mapInitialized = true;
848
846
  this.initMarkerPool();
849
847
  console.log("".concat(this.type, " map script initialized"), divElement);
850
848
  resolve(map);
849
+ map.trigger('idle');
851
850
  return [2];
852
851
  }
853
852
  });
@@ -1177,9 +1176,11 @@ var GoogleMintMapController = function (_super) {
1177
1176
  GoogleMintMapController.prototype.clearDrawable = function (drawable) {
1178
1177
  if (drawable && drawable.native) {
1179
1178
  if (drawable.native instanceof google.maps.Marker || drawable.native instanceof google.maps.Polygon || drawable.native instanceof google.maps.Polyline) {
1179
+ google.maps.event.clearInstanceListeners(drawable.native);
1180
1180
  drawable.native.setMap(null);
1181
1181
  return true;
1182
1182
  } else if (drawable.native instanceof google.maps.marker.AdvancedMarkerView) {
1183
+ google.maps.event.clearInstanceListeners(drawable.native);
1183
1184
  drawable.native.map = null;
1184
1185
  return true;
1185
1186
  }
@@ -1292,6 +1293,7 @@ var GoogleMintMapController = function (_super) {
1292
1293
  gestureHandling: 'greedy',
1293
1294
  clickableIcons: false
1294
1295
  });
1296
+ this.map = map;
1295
1297
  map.addListener('idle', function () {
1296
1298
  _this.checkBoundsChangeThrottleTime() && _this.mapProps.onBoundsChanged && _this.mapProps.onBoundsChanged(_this.getCurrBounds());
1297
1299
  });
@@ -1312,7 +1314,6 @@ var GoogleMintMapController = function (_super) {
1312
1314
 
1313
1315
  _this.mapProps.onMouseMove(pos);
1314
1316
  });
1315
- this.map = map;
1316
1317
  this.mapInitialized = true;
1317
1318
  console.log("".concat(this.type, " map script initialized"), divElement);
1318
1319
  resolve(map);
package/dist/index.umd.js CHANGED
@@ -679,9 +679,6 @@
679
679
  if (drawable.native instanceof naver.maps.Marker) {
680
680
  if (this.mapProps.markerCache && this.markerPool) {
681
681
  drawable.native.setVisible(false);
682
- this.markerEvents.map(function (eName) {
683
- drawable.native.clearListeners(eName);
684
- });
685
682
  (_a = this.markerPool) === null || _a === void 0 ? void 0 : _a.releasePoolItem(drawable.native);
686
683
  } else {
687
684
  drawable.native.setMap(null);
@@ -690,6 +687,7 @@
690
687
  drawable.native.setMap(null);
691
688
  }
692
689
 
690
+ naver.maps.Event.clearInstanceListeners(drawable.native);
693
691
  return true;
694
692
  }
695
693
 
@@ -817,6 +815,7 @@
817
815
  options.minZoom = minZoom;
818
816
  options.maxZoom = maxZoom;
819
817
  map = new naver.maps.Map(divElement, options);
818
+ this.map = map;
820
819
  map.addListener('dragstart', function (e) {
821
820
  _this.dragStartPoint[0] = e.domEvent.clientX;
822
821
  _this.dragStartPoint[1] = e.domEvent.clientY;
@@ -848,11 +847,11 @@
848
847
 
849
848
  _this.mapProps.onMouseMove(pos);
850
849
  });
851
- this.map = map;
852
850
  this.mapInitialized = true;
853
851
  this.initMarkerPool();
854
852
  console.log("".concat(this.type, " map script initialized"), divElement);
855
853
  resolve(map);
854
+ map.trigger('idle');
856
855
  return [2];
857
856
  }
858
857
  });
@@ -1182,9 +1181,11 @@
1182
1181
  GoogleMintMapController.prototype.clearDrawable = function (drawable) {
1183
1182
  if (drawable && drawable.native) {
1184
1183
  if (drawable.native instanceof google.maps.Marker || drawable.native instanceof google.maps.Polygon || drawable.native instanceof google.maps.Polyline) {
1184
+ google.maps.event.clearInstanceListeners(drawable.native);
1185
1185
  drawable.native.setMap(null);
1186
1186
  return true;
1187
1187
  } else if (drawable.native instanceof google.maps.marker.AdvancedMarkerView) {
1188
+ google.maps.event.clearInstanceListeners(drawable.native);
1188
1189
  drawable.native.map = null;
1189
1190
  return true;
1190
1191
  }
@@ -1297,6 +1298,7 @@
1297
1298
  gestureHandling: 'greedy',
1298
1299
  clickableIcons: false
1299
1300
  });
1301
+ this.map = map;
1300
1302
  map.addListener('idle', function () {
1301
1303
  _this.checkBoundsChangeThrottleTime() && _this.mapProps.onBoundsChanged && _this.mapProps.onBoundsChanged(_this.getCurrBounds());
1302
1304
  });
@@ -1317,7 +1319,6 @@
1317
1319
 
1318
1320
  _this.mapProps.onMouseMove(pos);
1319
1321
  });
1320
- this.map = map;
1321
1322
  this.mapInitialized = true;
1322
1323
  console.log("".concat(this.type, " map script initialized"), divElement);
1323
1324
  resolve(map);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mint-ui/map",
3
- "version": "0.3.2-beta",
3
+ "version": "0.3.4-beta",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.es.js",
6
6
  "browser": "./dist/index.umd.js",