This project is archived and is in readonly mode.

#1184 ✓wontfix
Nico

Element visibility ( window+scroll / element position)

Reported by Nico | February 26th, 2011 @ 10:32 AM | in 1.4.0 (closed)

I have searched in the doc but I dont find something like this :

Element.implement({

    visible: function(){
        var elCoordinates=this.getCoordinates();
        var winSize=window.getSize();
        var winScroll=document.body.getScroll();

        if (elCoordinates.top+elCoordinates.height < winSize.y+winScroll.y && elCoordinates.top>winScroll.y){
            var y=true;
        }
        if( elCoordinates.left+elCoordinates.width < winSize.x+winScroll.x && elCoordinates.left>winScroll.x){
            var x=true;
        }
        return {'x':x,'y':y};
    }
});

It's for use the new axes improvement in Fx.Scroll for propose a improvement in Form.Validator.Inline

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Shared Ticket Bins

People watching this ticket

Pages