Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ember-leaflet-marker-cluster

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ember-leaflet-marker-cluster - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

37

addon/components/marker-cluster-layer.js

@@ -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": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc