Commit afda31a8 by Иван Кубота

Store.debounce now return function that have now method

parent c18a196b
......@@ -710,14 +710,21 @@ Store.debounce = function(fn, dt, strictDelay) {
timeout = false;
fn.apply(scope, args)
};
return function(){
var out = function(){
lastCall = +new Date();
args = [].slice.call(arguments);
scope = this;
if(!timeout){
timeout = setTimeout(realCall, dt);
}
};
out.now = function(anyway){
if(timeout || anyway) {
clearTimeout( timeout )
realCall();
}
}
return out;
};
var HookPrototype = function() {};
HookPrototype.prototype = {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment