Changeset 18908 for lang/javascript

Show
Ignore:
Timestamp:
09/06/08 02:11:14 (3 months ago)
Author:
maripo
Message:

小窓の位置がズレる問題を修正

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/javascript/userscripts/poptip.user.js

    r18902 r18908  
    386386    // adjust position 
    387387    var targetDimension = getDimension(targetElement); 
    388     //FIXME 
    389388    if (targetDimension.offsetRight > targetDimension.offsetLeft) { 
    390389        // Right 
     
    396395        // Left 
    397396        var dimension = getDimension(this); 
    398         if (dimension.width > targetDimension.offsetLeft) popupAreaObj.style.width = targetDimension.offsetLeft + 'px'; 
    399         popupAreaObj.style.left = targetDimension.left -dimension.width + 'px'; 
    400         popupAreaObj.style.top = targetDimension.top; 
     397        this.style.top = targetDimension.top; 
     398        if (dimension.width > targetDimension.offsetLeft) this.style.width = targetDimension.offsetLeft + 'px'; 
     399        this.style.left = targetDimension.left - this.offsetWidth + 'px'; 
    401400    } 
    402401