From fead0b5f7d72bae643419768de0987f56b786cb1 Mon Sep 17 00:00:00 2001 From: Tom Occhino Date: Mon, 6 Oct 2008 01:13:39 -0400 Subject: [PATCH] manually merging Aaron's getOffsets IE fix, whitespace fix --- Source/Element/Element.Dimensions.js | 13 +++++++++---- Source/Fx/Fx.Transitions.js | 2 ++ 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/Source/Element/Element.Dimensions.js b/Source/Element/Element.Dimensions.js index 57bdd5008..7ee4e6b5a 100644 --- a/Source/Element/Element.Dimensions.js +++ b/Source/Element/Element.Dimensions.js @@ -60,6 +60,14 @@ Element.implement({ }, getOffsets: function(){ + if (Browser.Engine.trident){ + var bound = this.getBoundingClientRect(), html = this.getDocument().documentElement; + return { + x: bound.left + html.scrollLeft - html.clientLeft, + y: bound.top + html.scrollTop - html.clientTop + }; + } + var element = this, position = {x: 0, y: 0}; if (isBody(this)) return position; @@ -77,15 +85,12 @@ Element.implement({ position.x += leftBorder(parent); position.y += topBorder(parent); } - } else if (element != this && (Browser.Engine.trident || Browser.Engine.webkit)){ + } else if (element != this && Browser.Engine.webkit){ position.x += leftBorder(element); position.y += topBorder(element); } element = element.offsetParent; - if (Browser.Engine.trident){ - while (element && !element.currentStyle.hasLayout) element = element.offsetParent; - } } if (Browser.Engine.gecko && !borderBox(this)){ position.x -= leftBorder(this); diff --git a/Source/Fx/Fx.Transitions.js b/Source/Fx/Fx.Transitions.js index 5b13fe5a7..fb52f6887 100644 --- a/Source/Fx/Fx.Transitions.js +++ b/Source/Fx/Fx.Transitions.js @@ -10,6 +10,7 @@ Credits: */ Fx.implement({ + getTransition: function(){ var trans = this.options.transition || Fx.Transitions.Sine.easeInOut; if (typeof trans == 'string'){ @@ -19,6 +20,7 @@ Fx.implement({ } return trans; } + }); Fx.Transition = function(transition, params){