ember-leaflet-marker-cluster
Advanced tools
Comparing version 0.0.2 to 0.0.3
@@ -5,5 +5,24 @@ import Ember from 'ember'; | ||
const {get} = Ember; | ||
export default BaseLayer.extend(ContainerMixin,{ | ||
leafletOptions: [ | ||
'showCoverageOnHover', 'zoomToBoundsOnClick', 'spiderfyOnMaxZoom', 'removeOutsideVisibleBounds', | ||
'animate', 'animateAddingMarkers', 'disableClusteringAtZoom', 'maxClusterRadius', 'polygonOptions', | ||
'singleMarkerMode', 'spiderLegPolylineOptions', 'spiderfyDistanceMultiplier', 'iconCreateFunction' | ||
], | ||
leafletEvents: [ | ||
// Marker clutster events | ||
'clusterclick', 'clusterdblclick', 'clustermousedown', 'clustermouseover', 'clustermouseout', | ||
'clustercontextmenu', 'clusteradd', 'clusterremove', 'animationend', 'spiderfied', 'unspiderfied', | ||
// Marker events | ||
'click', 'dblclick', 'mousedown', 'mouseover', 'mouseout', | ||
'contextmenu', 'dragstart', 'drag', 'dragend', 'move', 'remove', 'add', | ||
'popupopen', 'popupclose' | ||
], | ||
createLayer(){ | ||
return this.L.markerClusterGroup(...this.get('requiredOptions'), this.get('options')); | ||
return this.L.markerClusterGroup(...get(this,'requiredOptions'), get(this,'options')); | ||
}, | ||
@@ -13,10 +32,10 @@ didInsertElement() { | ||
this.layerSetup(); | ||
this.get('_childLayers').invoke('layerSetup'); | ||
get(this,'_childLayers').invoke('layerSetup'); | ||
}, | ||
willDestroyLayer() { | ||
this.get('_childLayers').invoke('layerTeardown'); | ||
this.get('_childLayers').clear(); | ||
get(this,'_childLayers').invoke('layerTeardown'); | ||
get(this,'_childLayers').clear(); | ||
}, | ||
layerSetup() { | ||
if (Ember.isNone(this.get('_layer'))) { | ||
if (Ember.isNone(get(this,'_layer'))) { | ||
this._layer = this.createLayer(); | ||
@@ -27,8 +46,8 @@ this._addObservers(); | ||
} | ||
if (this.get('containerLayer')) { | ||
if (!Ember.isNone(this.get('containerLayer')._layer)) { | ||
this.get('containerLayer')._layer.addLayer(this._layer); | ||
if (get(this,'containerLayer')) { | ||
if (!Ember.isNone(get(this,'containerLayer')._layer)) { | ||
get(this,'containerLayer')._layer.addLayer(this._layer); | ||
} | ||
} | ||
} | ||
} | ||
}); |
@@ -19,4 +19,4 @@ /*jshint node:true*/ | ||
afterInstall: function(options) { | ||
return this.addBowerPackageToProject('leaflet.markercluster', '~0.4.0-hotfix.1'); | ||
return this.addBowerPackageToProject('leaflet.markercluster', '~0.5.0'); | ||
} | ||
}; |
{ | ||
"name": "ember-leaflet-marker-cluster", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "Addon for Ember-Leaflet which adds marker clusters", | ||
@@ -5,0 +5,0 @@ "directories": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9790
129