mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-31 21:19:21 +03:00
Replace timeOutAction() with debounce
Replace delegateRun() Revert my throttle/debounce setTimeout() to Function.prototype[throttle/debounce]
This commit is contained in:
parent
f6a55898c7
commit
97a73c6639
28 changed files with 225 additions and 372 deletions
|
|
@ -32,16 +32,7 @@ class HtmlEditor {
|
|||
this.element = element;
|
||||
this.$element = jQuery(element);
|
||||
|
||||
// throttle
|
||||
var t, o = this;
|
||||
this.resize = ()=>{
|
||||
if (!t) {
|
||||
t = setTimeout(()=>{
|
||||
o.resizeEditor();
|
||||
t = 0;
|
||||
}, 100);
|
||||
}
|
||||
};
|
||||
this.resize = this.resizeEditor.throttle(100);
|
||||
|
||||
this.init();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue