Changeset 766


Ignore:
Timestamp:
03/09/07 03:17:56 (12 years ago)
Author:
ray
Message:

Ticket #976 Loading message misplaced in IE7

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/XinhaCore.js

    r765 r766  
    55815581 */ 
    55825582  
    5583 Xinha.getElementTopLeft = function(element) 
    5584 { 
    5585   var position = { top:0, left:0 }; 
    5586   while ( element ) 
    5587   { 
    5588     position.top  += element.offsetTop; 
    5589     position.left += element.offsetLeft; 
    5590     if ( element.offsetParent && element.offsetParent.tagName.toLowerCase() != 'body' ) 
    5591     { 
    5592       element = element.offsetParent; 
    5593     } 
    5594     else 
    5595     { 
    5596       element = null; 
    5597     } 
    5598   } 
    5599    
    5600   return position; 
     5583Xinha.getElementTopLeft = function(element)  
     5584{ 
     5585  var curleft = curtop = 0; 
     5586  if (element.offsetParent)  
     5587  { 
     5588    curleft = element.offsetLeft 
     5589    curtop = element.offsetTop 
     5590    while (element = element.offsetParent)  
     5591    { 
     5592      curleft += element.offsetLeft 
     5593      curtop += element.offsetTop 
     5594    } 
     5595  } 
     5596  return { top:curtop, left:curleft }; 
    56015597} 
    56025598 
Note: See TracChangeset for help on using the changeset viewer.