MCPcopy Index your code
hub / github.com/apache/echarts / cb

Function cb

test/lib/draggable.js:265–291  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

263 }
264
265 var cb = function () {
266 currCall = (new Date()).getTime();
267 scope = this;
268 args = arguments;
269 diff = currCall - (debounce ? lastCall : lastExec) - delay;
270
271 clearTimeout(timer);
272
273 if (debounce) {
274 if (trailing) {
275 timer = setTimeout(exec, delay);
276 }
277 else if (diff >= 0) {
278 exec();
279 }
280 }
281 else {
282 if (diff >= 0) {
283 exec();
284 }
285 else if (trailing) {
286 timer = setTimeout(exec, -diff);
287 }
288 }
289
290 lastCall = currCall;
291 };
292
293 /**
294 * Clear throttle.

Callers 2

eachCtxFunction · 0.70
runFrameFunction · 0.50

Calls 1

execFunction · 0.70

Tested by

no test coverage detected