summaryrefslogtreecommitdiff
path: root/frontend/gamma/js/MochiKit/Style.js
Side-by-side diff
Diffstat (limited to 'frontend/gamma/js/MochiKit/Style.js') (more/less context) (show whitespace changes)
-rw-r--r--frontend/gamma/js/MochiKit/Style.js19
1 files changed, 11 insertions, 8 deletions
diff --git a/frontend/gamma/js/MochiKit/Style.js b/frontend/gamma/js/MochiKit/Style.js
index 7f10117..740fd2f 100644
--- a/frontend/gamma/js/MochiKit/Style.js
+++ b/frontend/gamma/js/MochiKit/Style.js
@@ -7,7 +7,10 @@ See <http://mochikit.com/> for documentation, downloads, license, etc.
(c) 2005-2006 Bob Ippolito, Beau Hartshorne. All rights Reserved.
+The MochiKit.Style.getElementPosition function is adapted from
+YAHOO.util.Dom.getXY v0.9.0. which is copyrighted by Yahoo! Inc.
+
***/
-MochiKit.Base._module('Style', '1.5', ['Base', 'DOM']);
+MochiKit.Base.module(MochiKit, 'Style', '1.5', ['Base', 'DOM']);
@@ -180,5 +183,5 @@ MochiKit.Base.update(MochiKit.Style, {
typeof(o.x) == "number" &&
typeof(o.y) == "number";
- }
+ };
if (typeof(elem) == "string") {
@@ -198,5 +201,5 @@ MochiKit.Base.update(MochiKit.Style, {
var b = d.body;
- if (!elem.parentNode && elem.x && elem.y) {
+ if (isCoordinates(elem)) {
/* it's just a MochiKit.Style.Coordinates object */
c.x += elem.x || 0;
@@ -229,6 +232,6 @@ MochiKit.Base.update(MochiKit.Style, {
if (parent != elem) {
while (parent) {
- c.x += parseInt(parent.style.borderLeftWidth) || 0;
- c.y += parseInt(parent.style.borderTopWidth) || 0;
+ c.x += parseInt(parent.style.borderLeftWidth, 10) || 0;
+ c.y += parseInt(parent.style.borderTopWidth, 10) || 0;
c.x += parent.offsetLeft;
c.y += parent.offsetTop;
@@ -391,5 +394,5 @@ MochiKit.Base.update(MochiKit.Style, {
var tableCell = 'colSpan' in elem && 'rowSpan' in elem;
var collapse = (tableCell && elem.parentNode && self.getStyle(
- elem.parentNode, 'borderCollapse') == 'collapse')
+ elem.parentNode, 'borderCollapse') == 'collapse');
if (collapse) {
if (/MSIE/.test(navigator.userAgent)) {
@@ -544,6 +547,6 @@ MochiKit.Base.update(MochiKit.Style, {
// Backwards compatibility aliases
- m._deprecated(this, 'elementPosition', 'MochiKit.Style.getElementPosition', '1.3');
- m._deprecated(this, 'elementDimensions', 'MochiKit.Style.getElementDimensions', '1.3');
+ m._deprecated(this, 'elementPosition', 'MochiKit.Style.getElementPosition', '1.3', true);
+ m._deprecated(this, 'elementDimensions', 'MochiKit.Style.getElementDimensions', '1.3', true);
this.hideElement = m.partial(this.setDisplayForElement, 'none');