Author: max
Date: 2007-10-11 15:23:38 -0700 (Thu, 11 Oct 2007)
New Revision: 6815
Modified:
openlaszlo/trunk/lps/components/extensions/drawview.lzx
Log:
Change 20071010-maxcarlson-6 by [EMAIL PROTECTED] on 2007-10-10 08:53:05 PDT
in /Users/maxcarlson/openlaszlo/trunk
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: Hide drawviews when height/width < 0
New Features:
Bugs Fixed: LPP-4863 - dhtml drawview should hide when width and/or height are
< 0
Technical Reviewer: [EMAIL PROTECTED]
QA Reviewer: promanik
Doc Reviewer: (pending)
Documentation:
Release Notes:
Details: Keep track of whether drawview is currently hidden. Reset state when
shown.
Tests: See LPP-4863 for a testcase. Tested under IE 7 and firefox dhtml and
swf.
Modified: openlaszlo/trunk/lps/components/extensions/drawview.lzx
===================================================================
--- openlaszlo/trunk/lps/components/extensions/drawview.lzx 2007-10-11
16:46:10 UTC (rev 6814)
+++ openlaszlo/trunk/lps/components/extensions/drawview.lzx 2007-10-11
22:23:38 UTC (rev 6815)
@@ -276,8 +276,8 @@
}
function _onconstruct(args) {
- var w = args ? args['width'] : this.width;
- var h = args ? args['height'] : this.height;
+ var w = Math.floor(args ? args['width'] : this.width);
+ var h = Math.floor(args ? args['height'] : this.height);
if (this['__id'] == null && w > 0 && h > 0) {
this._buildcanvas(w, h);
}
@@ -320,6 +320,7 @@
if (Lz.__BrowserDetect.isIE) {
// IE can take a while to start up.
+ this._hidden = false;
this.maxTries = 10;
this.__initie();
} else {
@@ -328,14 +329,32 @@
}
function setWidth(w) {
super.setWidth(w);
- if (this.height > 0) {
- this._buildcanvas(w, this.height);
+ w = Math.floor(w);
+ var h = Math.floor(this.height);
+ if (h > 0 && w > 0) {
+ this._buildcanvas(w, h);
+ if (this.__LZcanvas && this['_hidden']) {
+ this._hidden = false;
+ this.__LZcanvas.style.visibility = null;
+ }
+ } else if (this.__LZcanvas && this['_hidden'] != true) {
+ this._hidden = true;
+ this.__LZcanvas.style.visibility = "hidden";
}
}
function setHeight(h) {
super.setHeight(h);
- if (this.width > 0) {
- this._buildcanvas(this.width, h);
+ var w = Math.floor(this.width);
+ h = Math.floor(h);
+ if (w > 0 && h > 0) {
+ this._buildcanvas(w, h);
+ if (this.__LZcanvas && this['_hidden']) {
+ this._hidden = false;
+ this.__LZcanvas.style.visibility = null;
+ }
+ } else if (this.__LZcanvas && this['_hidden'] != true) {
+ this._hidden = true;
+ this.__LZcanvas.style.visibility = "hidden";
}
}
_______________________________________________
Laszlo-checkins mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-checkins