Friday, 15 March 2013

javascript - dojo aspect and key press -


Capturing a major press event with the dojo / aspect and aspect There is no way. ?

I am using a third party JavaScript API (ESRI JS API v3.4) which provides a widget for graphics drawing on the map. The Drag the Toolbar widget contains an ondroyd event that provides the size of the graphic object created as a parameter. I need to determine that the user was pressing the CTRL or SHIFT key while drawing on the map with this code, but I use the aspect . After (Drawing Toolbar, "On Dude", My Handler Function, True) . To connect to the drawing event.

The only way I know that when a key is pressed, a event object that is not provided when using aspect , such as With dojo / on .

Any ideas how can I determine if a key is pressed down here?

You may have another way to catch a key-event.

In this way, I keep "Enter" in a text box-in Avent. When the Enter key is killed, the function is called zoomToAnlage (). It is important that this event listener has already been filled in in-phase, of course, this is not the total resolution of your question, but perhaps it shows a way how you can manage it.

  function initKielAnlagenNummernSuchen () {queryTaskAnlagenNummern = new esri.tasks.QueryTask (restServicesLocation + NameSearchService + "/ MapServer / 23"); QueryallAnlagenNummern = new esri.tasks.Query (); QueryallAnlagenNummern.returnGeometry = True; QueryallAnlagenNummern.outFields = ["Analog"]; Function (keys, dom, on) is required for {on (dom.byId ("selectAnlagenNummer"), "keypress", function (evt) (["dojo / keys", "dojo / dom", "dojo / on "], {Var charOrCode = evt.charCode || evt.keyCode; if (charOrCode == keys.enter) {zoomToAnlage ();}})}}   

} < / P>

Here is the link for the dojo / key: Regards, Miriam

No comments:

Post a Comment