Open mjanda opened 9 years ago
I'm thinking how to set options on markers belonging to collectionlayer.
One way is to set options key on content and change layers/marker.js
options: null,
to
options: Ember.computed.alias('content.options'),
Not sure if that won't break something else, so far I'm just thinking out loud here.
Other way would be to do it in collection.js / objectWasAdded() - do something like
var childLayer = this.createChildLayer(get(this, 'itemLayerClass'), { content: obj, options: obj.options });
but that seems hacky. But doing it this way would easily allow having global options on collection itself and optionally overriding them on some markers.
Any ideas before I'll put together PR?
I'm thinking how to set options on markers belonging to collectionlayer.
One way is to set options key on content and change layers/marker.js
to
Not sure if that won't break something else, so far I'm just thinking out loud here.
Other way would be to do it in collection.js / objectWasAdded() - do something like
but that seems hacky. But doing it this way would easily allow having global options on collection itself and optionally overriding them on some markers.
Any ideas before I'll put together PR?