Skip to content

Commit

Permalink
Merge 323f74d into 4aafcd6
Browse files Browse the repository at this point in the history
  • Loading branch information
LePetitTim committed Nov 19, 2018
2 parents 4aafcd6 + 323f74d commit 9bfe0a5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion mapentity/static/mapentity/leaflet-objectslayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ L.ObjectsLayer = L.GeoJSON.extend({
this.fire('highlight', {layer: layer});
}
else {
layer.setStyle(layer._defaultStyle);
this.resetStyle(layer);
}
},

Expand Down
8 changes: 6 additions & 2 deletions mapentity/static/mapentity/mapentity.map.js
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,12 @@ $(window).on('entity:map:list', function (e, data) {
return window.SETTINGS.urls.detail.replace(new RegExp('modelname', 'g'), data.modelname)
.replace('0', properties.pk);
}

var style = L.Util.extend({}, window.SETTINGS.map.styles.others);
if (typeof window.SETTINGS.map.styles.others === "function"){
var style = window.SETTINGS.map.styles.others;
}
else{
var style = L.Util.extend({}, window.SETTINGS.map.styles.others);
}
var objectsLayer = new L.ObjectsLayer(null, {
objectUrl: getUrl,
style: style,
Expand Down
2 changes: 1 addition & 1 deletion mapentity/templates/mapentity/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@

{# Global Javascript settings #}
<script src="{% url JS_SETTINGS_VIEW %}?callback=window.SETTINGS%3D"></script>

{% block change_style %}{% endblock change_style %}
{% compress js %}

{% if DEBUG %}
Expand Down

0 comments on commit 9bfe0a5

Please sign in to comment.