Created
December 16, 2009 03:39
-
-
Save mynameisrufus/257565 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
}else if(this.options.position.length){ | |
if(typeof(this.options.position[1]) == 'string') { | |
var topFinal = this.options.position[1]; | |
} else { | |
var top = $value(this.options.position[1]) + $value(this.options.offsetTop); | |
var topFinal = (container_dimensions.height <= viewport_dimensions.height) ? (this.options.constrainToViewport ? Math.max(0,Math.min(viewport_dimensions.height - (container_dimensions.height),top)) : top) + 'px' : 0; | |
} | |
if(typeof(this.options.position[0]) == 'string') { | |
var leftFinal = this.options.position[0]; | |
} else { | |
var left = $value(this.options.position[0]) + $value(this.options.offsetLeft); | |
var leftFinal = (container_dimensions.width <= viewport_dimensions.width) ? (this.options.constrainToViewport ? Math.max(0,Math.min(viewport_dimensions.width - (container_dimensions.width),left)) : left) + 'px' : 0; | |
} | |
this.container.setStyle({top: topFinal,left: leftFinal}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment