MCPcopy
hub / github.com/bevacqua/dragula / getEventHost

Function getEventHost

dragula.js:586–597  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

584}
585
586function getEventHost (e) {
587 // on touchend event, we have to use `e.changedTouches`
588 // see http://stackoverflow.com/questions/7192563/touchend-event-properties
589 // see https://github.com/bevacqua/dragula/issues/34
590 if (e.targetTouches && e.targetTouches.length) {
591 return e.targetTouches[0];
592 }
593 if (e.changedTouches && e.changedTouches.length) {
594 return e.changedTouches[0];
595 }
596 return e;
597}
598
599function getCoord (coord, e) {
600 var host = getEventHost(e);

Callers 1

getCoordFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…