MCPcopy Create free account
hub / github.com/DHTMLX/gantt / clickRepeat

Function clickRepeat

samples/common/codehighlight/codemirror.js:7272–7286  ·  view source on GitHub ↗
(pos, button)

Source from the content-addressed store, hash-verified

7270
7271 var lastClick, lastDoubleClick;
7272 function clickRepeat(pos, button) {
7273 var now = +new Date;
7274 if (lastDoubleClick && lastDoubleClick.compare(now, pos, button)) {
7275 lastClick = lastDoubleClick = null;
7276 return "triple"
7277 } else if (lastClick && lastClick.compare(now, pos, button)) {
7278 lastDoubleClick = new PastClick(now, pos, button);
7279 lastClick = null;
7280 return "double"
7281 } else {
7282 lastClick = new PastClick(now, pos, button);
7283 lastDoubleClick = null;
7284 return "single"
7285 }
7286 }
7287
7288 // A mouse down can be a single click, double click, triple click,
7289 // start of selection drag, start of text drag, new cursor

Callers 1

onMouseDownFunction · 0.85

Calls 1

compareMethod · 0.80

Tested by

no test coverage detected