import v1.1.0_beta1 | 2009-08-21

This commit is contained in:
2019-07-17 22:16:19 +02:00
parent 2c1152f0d3
commit 8dee6b1a10
2306 changed files with 251360 additions and 23428 deletions

View File

@ -1,8 +1,8 @@
/*
Copyright (c) 2008, Yahoo! Inc. All rights reserved.
Copyright (c) 2009, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 2.6.0
version: 2.7.0
*/
(function() {
@ -89,11 +89,16 @@ Anim.prototype = {
* @param {String} unit The unit ('px', '%', etc.) of the value.
*/
setAttribute: function(attr, val, unit) {
var el = this.getEl();
if ( this.patterns.noNegatives.test(attr) ) {
val = (val > 0) ? val : 0;
}
Y.Dom.setStyle(this.getEl(), attr, val + unit);
if ('style' in el) {
Y.Dom.setStyle(el, attr, val + unit);
} else if (attr in el) {
el[attr] = val;
}
},
/**
@ -114,11 +119,15 @@ Anim.prototype = {
var pos = !!( a[3] ); // top or left
var box = !!( a[2] ); // width or height
// use offsets for width/height and abs pos top/left
if ( box || (Y.Dom.getStyle(el, 'position') == 'absolute' && pos) ) {
val = el['offset' + a[0].charAt(0).toUpperCase() + a[0].substr(1)];
} else { // default to zero for other 'auto'
val = 0;
if ('style' in el) {
// use offsets for width/height and abs pos top/left
if ( box || (Y.Dom.getStyle(el, 'position') == 'absolute' && pos) ) {
val = el['offset' + a[0].charAt(0).toUpperCase() + a[0].substr(1)];
} else { // default to zero for other 'auto'
val = 0;
}
} else if (attr in el) {
val = el[attr];
}
return val;
@ -1382,4 +1391,4 @@ YAHOO.util.Easing = {
Y.Scroll = Scroll;
})();
YAHOO.register("animation", YAHOO.util.Anim, {version: "2.6.0", build: "1321"});
YAHOO.register("animation", YAHOO.util.Anim, {version: "2.7.0", build: "1799"});

File diff suppressed because one or more lines are too long

View File

@ -1,8 +1,8 @@
/*
Copyright (c) 2008, Yahoo! Inc. All rights reserved.
Copyright (c) 2009, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 2.6.0
version: 2.7.0
*/
(function() {
@ -88,11 +88,16 @@ Anim.prototype = {
* @param {String} unit The unit ('px', '%', etc.) of the value.
*/
setAttribute: function(attr, val, unit) {
var el = this.getEl();
if ( this.patterns.noNegatives.test(attr) ) {
val = (val > 0) ? val : 0;
}
Y.Dom.setStyle(this.getEl(), attr, val + unit);
if ('style' in el) {
Y.Dom.setStyle(el, attr, val + unit);
} else if (attr in el) {
el[attr] = val;
}
},
/**
@ -113,11 +118,15 @@ Anim.prototype = {
var pos = !!( a[3] ); // top or left
var box = !!( a[2] ); // width or height
// use offsets for width/height and abs pos top/left
if ( box || (Y.Dom.getStyle(el, 'position') == 'absolute' && pos) ) {
val = el['offset' + a[0].charAt(0).toUpperCase() + a[0].substr(1)];
} else { // default to zero for other 'auto'
val = 0;
if ('style' in el) {
// use offsets for width/height and abs pos top/left
if ( box || (Y.Dom.getStyle(el, 'position') == 'absolute' && pos) ) {
val = el['offset' + a[0].charAt(0).toUpperCase() + a[0].substr(1)];
} else { // default to zero for other 'auto'
val = 0;
}
} else if (attr in el) {
val = el[attr];
}
return val;
@ -1378,4 +1387,4 @@ YAHOO.util.Easing = {
Y.Scroll = Scroll;
})();
YAHOO.register("animation", YAHOO.util.Anim, {version: "2.6.0", build: "1321"});
YAHOO.register("animation", YAHOO.util.Anim, {version: "2.7.0", build: "1799"});