r1558 - branches/bxe_2_0/js
[email protected] Fri, 20 Oct 2006 14:14:44 +0200 (CEST)
| Newsgroups | gmane.editors.bitflux.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: chregu
Date: Fri Oct 20 14:14:42 2006
New Revision: 1558
Modified:
branches/bxe_2_0/js/widget.js
Log:
test something with overflow and popups..
Modified: branches/bxe_2_0/js/widget.js
==============================================================================
--- branches/bxe_2_0/js/widget.js (original)
+++ branches/bxe_2_0/js/widget.js Fri Oct 20 14:14:42 2006
@@ -57,9 +57,13 @@
Widget.prototype.fixOffscreenPosition = function() {
var bottom = (this.node.offsetTop + this.node.offsetHeight);
+ this.node.style.maxHeight = window.innerHeight + 'px';
if (bottom > (window.innerHeight + window.scrollY)) {
- this.node.style.top = (this.node.offsetTop - (bottom - (window.innerHeight + window.scrollY))) + "px";
+ this.node.style.top = (this.node.offsetTop - (bottom - (window.innerHeight + window.scrollY))) + "px";
+
}
+
+
var right = (this.node.offsetLeft + this.node.offsetWidth);
if (right > (window.innerWidth + window.scrollX)) {
if (!this.isSubpopup) {
@@ -68,6 +72,13 @@
this.node.style.left = (this.node.offsetLeft - (right - (window.innerWidth + window.scrollX))) + "px";
}
+ if (this.node.offsetHeight > window.innerHeight) {
+ this.node.style.overflow = 'auto';
+
+ } else {
+ this.node.style.overflow = 'hidden';
+ }
+
}
--
Bx-editor-cvs mailing list
[email protected]
http://lists.bitflux.ch/cgi-bin/listinfo/bx-editor-cvs