dojo/on multiple map events

2799
2
06-29-2013 03:42 PM
BenFousek
Occasional Contributor III
dojo/on supports multiple event listeners like:
dijit.byId('test').on('click, contextmenu', function() {
 alert('hi')
});


however multiple events don't work on a map:
//this doesn't work
app.map.on('mouse-move, mouse-drag', function(evt) {
 //do something or other
});
//neither does this
app.map.on('click, contextmenu', function(evt) {
 //do something or other
});


Why is this and will it be possible in a future version?
0 Kudos
2 Replies
BenFousek
Occasional Contributor III
I don't think esri classes support multiple event listeners with a single on style event. They register but don't fire.

It's not a big deal. I was trying to reduce code by using one listener for two events that do the same thing.
0 Kudos