Closed aansubarkah closed 8 years ago
A few different ways to do this, however the simplest would probably be to provide your controller action to the marker's dblclick
method. Marker documentation
I found this code working. Basicly i am accessing Ember from window property.
dblclick: function(event, marker, placeName = 'Jakarta') {
var controller = EmberAPPName.__container__.lookup("controller:ControllerName");
var boundSend = controller.send.bind(controller);
boundSend('toggleCreateNewMarkerWithPlace', marker, placeName);
}
But i even don't know if that code is efficient or please js nazi
Since this code has little to do with the project, it may be more helpful if you ask this on the Ember Slack. In addition, please refrain from using defamatory language in a professional setting such as Github or the Ember Slack.
i want to pop up a modal (by toggle boolean property on controller) when double click marker, how to access controller's action by double clicking marker?