Drop windowResize/windowResizeCallback in favor of ResizeObservable

This commit is contained in:
djmaze 2020-08-19 12:34:05 +02:00
parent e192b60d69
commit 7a21694396
14 changed files with 25 additions and 110 deletions

View file

@ -1,10 +1,6 @@
import ko from 'ko';
import { KeyState } from 'Common/Enums';
const $win = jQuery(window);
export { $win };
export const $html = jQuery('html');
export const $htmlCL = document.documentElement.classList;

View file

@ -1,6 +1,6 @@
import ko from 'ko';
import { $win, dropdownVisibility, data as GlobalsData } from 'Common/Globals';
import { dropdownVisibility, data as GlobalsData } from 'Common/Globals';
import { ComposeType, SaveSettingsStep, FolderType } from 'Common/Enums';
import { Mime } from 'Common/Mime';
@ -1170,23 +1170,6 @@ export function mailToHelper(mailToUrl, PopupComposeViewModel) {
return false;
}
var wr;
export const windowResize = timeout => {
clearTimeout(wr);
if (null == timeout) {
$win.trigger('resize');
} else {
wr = setTimeout(()=>$win.trigger('resize'), timeout);
}
};
/**
* @returns {void}
*/
export function windowResizeCallback() {
windowResize();
}
let substr = String.substr;
if ('b' !== 'ab'.substr(-1)) {
substr = (str, start, length) => {