// get the map id, coincides with DOM element id. var nodeId = this.map.id; // get the graphics container node, it looks like "map-id_gc" var node = dom.byId(nodeId+'_gc'); // listen for doubletap on the graphics container of svg graphics on(node, tap.doubletap, lang.hitch(this, function(e) { // I keep an array of layers to search through, but you could just // work off a single layer arrayUtils.forEach(layersArray, function(lyr) { var i = lyr.graphics.length; while(i--) { // get a graphic var graphic = lyr.graphics; // get the node of the graphic var gnode = graphic.getNode(); // if the node and the doubletap target are a match // do what you want to do if (gnode === e.target) { e.graphic = graphic; // I pass this on to my original double-click // handler and just add the graphic to the event // pretty much a duplicate of the dbl-click event this.onLayerDblClick(e); } } }, this); }) );
Jonathan Uihlein is doubletap still being looked at? it is still not working in 3.12
Thank you. It is nice to know its on the list so to speak, so I dont have to spend alot of time on work arounds.
Thanks Jonathan Uihlein
Jeff is right that it is being looked at.
There are some 'gotchas' in different device/browser combos which, unfortunately, require their own specific logic.
Ideally, there would be events for tap, swipe, drag and hover. There are some fantastic use-cases for each of these.
No ETA yet but this enhancement may end up being a part of 4.0 if time is an issue.
it didnt work for me b/c of the click event conflicts. Jonathan Uihlein indicated it is on the roadmap, but I am not sure where.
It is desperately need.
I'm curious if getting double-tap to work in an upcoming version of the API is on the roadmap anywhere. Mobile editing is pretty key and although the hack I posted still works, I am finding it can interfere with some other click events on the map. I am still trying to work around this issue in my particular case, so it may work fine for others. It would however be nice if the API could check for touch events and fallback to those as needed behind the scenes.
By the way, I have created a widget that implements the above hack.
odoe/esri-simpleedit-widget · GitHub
Membros conectados podem postar, seguir atualizações e mais. Novo aqui? Registre uma conta gratuita.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.