Esri / arcgis-dijit-locate-button-js

A simple dijit button that when clicked navigates to the users current location using HTML5 Geolocation if available.
http://esri.github.io/arcgis-dijit-locate-button-js/
Apache License 2.0
4 stars 8 forks source link

Replaced _OnDijitClickMixin with a11yclick and use dijit/_WidgetBase::own to binding handler. #1

Closed odoe closed 11 years ago

odoe commented 11 years ago

The dijit/_OnDijitClickMixin has been deprecated in place of dijit/a11yclick according to the source. dijit/_OnDijitClickMixin will fall back to dijit/a11yclick anyway. I replaced these modules in the source.

Since using a11yclick, I also removed the data-dojo-attach-event="ondijitclick:locate" from the template and placed a listener using dojo/on in the postCreate method using diji/_WidgetBase::own per this sitepen post.

This probably isn't critical as I'm sure dijit/_OnDijitClickMixin will keep working until Dojo 2.0 and I know it is probably used extensively in the ArcGIS API for JavaScript, but if the API will move to Dojo 2.0 in the future, this is probably how it would look in most cases. This is how I have been using it in my widgets and have had no issues.

Thanks.

driskull commented 11 years ago

Guess I'll have to update other widgets to do this as well. Thanks for the heads up Rene!