stamen / modestmaps-js

Modest Maps javascript port
http://modestmaps.com
566 stars 152 forks source link

attach all normal DOM events to the map.parent in map.addCallback #10

Closed RandomEtc closed 12 years ago

RandomEtc commented 13 years ago

So you can do:

map.addCallback('click', function(){
    alert("HI·THERE");
});

Instead of:

com.modestmaps.addEvent(map.parent, 'click', function(event) { 
    alert('yo');
})
tmcw commented 12 years ago

I'm not sure that this should be a priority - what's the advantage of this over just binding them yourself? My guess is that a lot of users will have their own application-specific event-library anyway.

RandomEtc commented 12 years ago

That was my initial response too - I believe this was a feature request from one of your colleagues. Maybe @kkaefer?

tmcw commented 12 years ago

Hmm, well we've done without it for a year or so, and I think we already have a few examples (wax, tilemill, easey) of projects happily binding events for themselves. I'll close for now.