| Server IP : 172.67.187.206 / Your IP : 172.71.28.155 Web Server : Apache/2.4.25 (Win32) OpenSSL/1.0.2j PHP/5.6.30 System : Windows NT WIN-ECQAAA40806 6.2 build 9200 (Windows Server 2012 Standard Edition) i586 User : SYSTEM ( 0) PHP Version : 5.6.30 Disable Function : NONE MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : E:/Inetpub/www/myschool/triamudom/tuprblearn/lib/yuilib/3.17.2/event-resize/ |
Upload File : |
/*
YUI 3.17.2 (build 9c3c78e)
Copyright 2014 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add('event-resize', function (Y, NAME) {
/**
* Adds a window resize event that has its behavior normalized to fire at the
* end of the resize rather than constantly during the resize.
* @module event
* @submodule event-resize
*/
/**
* Old firefox fires the window resize event once when the resize action
* finishes, other browsers fire the event periodically during the
* resize. This code uses timeout logic to simulate the Firefox
* behavior in other browsers.
* @event windowresize
* @for YUI
*/
Y.Event.define('windowresize', {
on: (Y.UA.gecko && Y.UA.gecko < 1.91) ?
function (node, sub, notifier) {
sub._handle = Y.Event.attach('resize', function (e) {
notifier.fire(e);
});
} :
function (node, sub, notifier) {
// interval bumped from 40 to 100ms as of 3.4.1
var delay = Y.config.windowResizeDelay || 100;
sub._handle = Y.Event.attach('resize', function (e) {
if (sub._timer) {
sub._timer.cancel();
}
sub._timer = Y.later(delay, Y, function () {
notifier.fire(e);
});
});
},
detach: function (node, sub) {
if (sub._timer) {
sub._timer.cancel();
}
sub._handle.detach();
}
// delegate methods not defined because this only works for window
// subscriptions, so...yeah.
});
}, '3.17.2', {"requires": ["node-base", "event-synthetic"]});