[Laszlo-checkins] r3923 - in openlaszlo/branches/legals/lps/components/charts: addon/slider common piechart
pbr@openlaszlo.org
pbr at openlaszlo.org
Sat Feb 24 11:48:33 PST 2007
Author: pbr
Date: 2007-02-24 11:48:19 -0800 (Sat, 24 Feb 2007)
New Revision: 3923
Modified:
openlaszlo/branches/legals/lps/components/charts/addon/slider/slider.lzx
openlaszlo/branches/legals/lps/components/charts/common/datamarker.lzx
openlaszlo/branches/legals/lps/components/charts/common/dataseries.lzx
openlaszlo/branches/legals/lps/components/charts/common/valueregion.lzx
openlaszlo/branches/legals/lps/components/charts/common/virtualdrawview.lzx
openlaszlo/branches/legals/lps/components/charts/piechart/piepiece.lzx
Log:
Change 20070124-Philip-8 by Philip at Philip-DC on 2007-01-24 14:02:29 EST
in /cygdrive/f/laszlo/svn/src/svn/openlaszlo/branches/legals
Summary: Improvements to make charting work better in swf
New Features:
Bugs Fixed:
Technical Reviewer: ptw
QA Reviewer: (pending)
Doc Reviewer: (pending)
Documentation:
Release Notes:
Details:
Not all browsers can draw gradients so check for null before drawing.
Fix how LzDataset objects are created.
Tests:
charting tests run better in swf. They also run further in dhtml but there are s
till significant issues in dhtml.
Files:
M lps/components/charts/piechart/piepiece.lzx
M lps/components/charts/common/datamarker.lzx
M lps/components/charts/common/valueregion.lzx
M lps/components/charts/common/dataseries.lzx
\nChangeset: http://svn.openlaszlo.org/openlaszlo/patches/20070124-Philip-8.tar
Modified: openlaszlo/branches/legals/lps/components/charts/addon/slider/slider.lzx
===================================================================
--- openlaszlo/branches/legals/lps/components/charts/addon/slider/slider.lzx 2007-02-24 07:59:59 UTC (rev 3922)
+++ openlaszlo/branches/legals/lps/components/charts/addon/slider/slider.lzx 2007-02-24 19:48:19 UTC (rev 3923)
@@ -147,17 +147,17 @@
</sliderknob>
<method event="onisMousedown" reference="leftknob">
- debug.write("set left");
+ Debug.write("set left");
this.setAttribute("isMouseDown", leftknob.isMouseDown);
</method>
<method event="onisMousedown" reference="rightknob">
- debug.write("set right");
+ Debug.write("set right");
this.setAttribute("isMouseDown", rightknob.isMouseDown);
</method>
<method event="onmaxlimit">
- debug.write("*************slider width: " + this.width);
+ Debug.write("*************slider width: " + this.width);
leftknob.setX(0);
rightknob.setX(this.width);
</method>
@@ -178,3 +178,8 @@
</class>
</library>
+<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
+* Copyright 2001-2007 Laszlo Systems, Inc. All Rights Reserved.
+* Use is subject to license terms.
+* X_LZ_COPYRIGHT_END ****************************************************** -->
+<!-- @LZX_VERSION@ -->
Modified: openlaszlo/branches/legals/lps/components/charts/common/datamarker.lzx
===================================================================
--- openlaszlo/branches/legals/lps/components/charts/common/datamarker.lzx 2007-02-24 07:59:59 UTC (rev 3922)
+++ openlaszlo/branches/legals/lps/components/charts/common/datamarker.lzx 2007-02-24 19:48:19 UTC (rev 3923)
@@ -19,7 +19,6 @@
//resize this view
this.pointrepresentation.setWidth(this.style.point.width);
this.pointrepresentation.setHeight(this.style.point.height);
-
//Check if it is a figure or an image
if( this.style.point.image != null ) {
//Must be a resource
@@ -108,10 +107,12 @@
mygradient = this.createLinearGradient(0,0,this.pointrepresentation.width,this.pointrepresentation.height);
}
- mygradient.addColorStop(0, 0xffffff);
- this.globalAlpha = 1;
- mygradient.addColorStop(1, this.style.point.color);
- this.fillStyle = mygradient;
+ if (mygradient) {
+ mygradient.addColorStop(0, 0xffffff);
+ this.globalAlpha = 1;
+ mygradient.addColorStop(1, this.style.point.color);
+ this.fillStyle = mygradient;
+ }
this.fill();
]]>
</method>
Modified: openlaszlo/branches/legals/lps/components/charts/common/dataseries.lzx
===================================================================
--- openlaszlo/branches/legals/lps/components/charts/common/dataseries.lzx 2007-02-24 07:59:59 UTC (rev 3922)
+++ openlaszlo/branches/legals/lps/components/charts/common/dataseries.lzx 2007-02-24 19:48:19 UTC (rev 3923)
@@ -79,11 +79,11 @@
-->
<method name="getNestedAttribute" args="attName">
<![CDATA[
- //debug.write("attribeName " + attName);
- //debug.write("attribeValue " + this[attName]);
+ //Debug.write("attribeName " + attName);
+ //Debug.write("attribeValue " + this[attName]);
if((this[attName] != "") && (this[attName] != null))
{
- //debug.write("attribeValue " + this[attName]);
+ //Debug.write("attribeValue " + this[attName]);
return this[attName];
}
else
@@ -142,13 +142,13 @@
<!--- clear the cache -->
<method name="clearCache">
- //debug.write("data column clear Cache");
+ //Debug.write("data column clear Cache");
this.values = null;
</method>
<!--- @keyword private -->
<method name="datachange">
- //debug.write("********column datachange ")
+ //Debug.write("********column datachange ")
//this.values = null;
</method>
@@ -202,8 +202,8 @@
-->
<method name="getNestedAttribute" args="attName">
<![CDATA[
- //debug.write("getNestedAttribute: " + attName);
- //debug.write("getNestedAttributeValue: " + this[attName]);
+ //Debug.write("getNestedAttribute: " + attName);
+ //Debug.write("getNestedAttributeValue: " + this[attName]);
if((this[attName] != "") && (this[attName] != null))
{
return this[attName];
@@ -224,7 +224,7 @@
-->
<method name="getDataColumn" args="name">
<![CDATA[
- //debug.write("datacolumnsmap[name]: " + datacolumnsmap[name]);
+ //Debug.write("datacolumnsmap[name]: " + datacolumnsmap[name]);
if(name != undefined){
if(datacolumnsmap[name] && datacolumnsmap[name].values)
@@ -234,7 +234,7 @@
for(var i = 0; i < this.subnodes.length; i++)
{
- //debug.write("subnodename: " + this.subnodes[i].name);
+ //Debug.write("subnodename: " + this.subnodes[i].name);
if((this.subnodes[i] instanceof datacolumn) && (this.subnodes[i].name == name))
{
@@ -304,11 +304,11 @@
var ds = canvas["legendds"];
if(!canvas["legendds"])
{
- ds = new LzDataset("legendds");
+ ds = new LzDataset(canvas, { name: "legendds"});
canvas["legendds"] = ds;
} else {
dscounter++;
- ds = new LzDataset("legendds"+dscounter);
+ ds = new LzDataset(canvas, { name: "legendds"+dscounter});
canvas["legendds"+dscounter] = ds;
}
Modified: openlaszlo/branches/legals/lps/components/charts/common/valueregion.lzx
===================================================================
--- openlaszlo/branches/legals/lps/components/charts/common/valueregion.lzx 2007-02-24 07:59:59 UTC (rev 3922)
+++ openlaszlo/branches/legals/lps/components/charts/common/valueregion.lzx 2007-02-24 19:48:19 UTC (rev 3923)
@@ -120,7 +120,8 @@
if( this.style.region.image != null ) {
this.setSource( this.style.region.image );
- this.setAttribute( "stretches", this.style.region.stretches );
+ if ('stretches' in this.style.region)
+ this.setAttribute( "stretches", this.style.region.stretches );
}
}
]]>
Modified: openlaszlo/branches/legals/lps/components/charts/common/virtualdrawview.lzx
===================================================================
--- openlaszlo/branches/legals/lps/components/charts/common/virtualdrawview.lzx 2007-02-24 07:59:59 UTC (rev 3922)
+++ openlaszlo/branches/legals/lps/components/charts/common/virtualdrawview.lzx 2007-02-24 19:48:19 UTC (rev 3923)
@@ -82,16 +82,16 @@
<!--- moveTo in virtual coordinate
-->
<method name="moveTo" args="x, y">
- //debug.write("moveTo(" + x + ", " + y + ")");
- //debug.write("moveTo2(" + x * this._xscale + this._xoffset+ ", " + y * this._yscale + this._yoffset + ")");
+ //Debug.write("moveTo(" + x + ", " + y + ")");
+ //Debug.write("moveTo2(" + x * this._xscale + this._xoffset+ ", " + y * this._yscale + this._yoffset + ")");
super.moveTo(x * this._xscale + this._xoffset, y * this._yscale + this._yoffset);
</method>
<!--- lineTo in virtual coordinate
-->
<method name="lineTo" args="x, y">
- //debug.write("lineTo(" + x + ", " + y + ")");
- //debug.write("lineto2(" + x * this._xscale + this._xoffset+ ", " + y * this._yscale + this._yoffset + ")");
+ //Debug.write("lineTo(" + x + ", " + y + ")");
+ //Debug.write("lineto2(" + x * this._xscale + this._xoffset+ ", " + y * this._yscale + this._yoffset + ")");
super.lineTo(x * this._xscale + this._xoffset, y * this._yscale + this._yoffset);
</method>
Modified: openlaszlo/branches/legals/lps/components/charts/piechart/piepiece.lzx
===================================================================
--- openlaszlo/branches/legals/lps/components/charts/piechart/piepiece.lzx 2007-02-24 07:59:59 UTC (rev 3922)
+++ openlaszlo/branches/legals/lps/components/charts/piechart/piepiece.lzx 2007-02-24 19:48:19 UTC (rev 3923)
@@ -164,11 +164,13 @@
var mygradient = this.createRadialGradient(-radius, -radius, 0, radius, radius, 0);
- this.globalAlpha = 0;
- mygradient.addColorStop(0, 0xffffff);
- this.globalAlpha = 1;
- mygradient.addColorStop(1, this.style.region.color);
- this.fillStyle = mygradient;
+ if (mygradient) {
+ this.globalAlpha = 0;
+ mygradient.addColorStop(0, 0xffffff);
+ this.globalAlpha = 1;
+ mygradient.addColorStop(1, this.style.region.color);
+ this.fillStyle = mygradient;
+ }
}
if (this.style.region.gradient == 'linear') {
@@ -188,11 +190,13 @@
var mygradient = this.createLinearGradient(positionX, positionY, -positionX*0.05, -positionY*0.05);
- this.globalAlpha = 0;
- mygradient.addColorStop(0, 0xffffff);
- this.globalAlpha = 1;
- mygradient.addColorStop(1, this.style.region.color);
- this.fillStyle = mygradient;
+ if (mygradient) {
+ this.globalAlpha = 0;
+ mygradient.addColorStop(0, 0xffffff);
+ this.globalAlpha = 1;
+ mygradient.addColorStop(1, this.style.region.color);
+ this.fillStyle = mygradient;
+ }
}
this.fill();
@@ -338,7 +342,7 @@
</class>
</library>
<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
-* Copyright 2001-2006 Laszlo Systems, Inc. All Rights Reserved.
+* Copyright 2001-2007 Laszlo Systems, Inc. All Rights Reserved.
* Use is subject to license terms.
* X_LZ_COPYRIGHT_END ****************************************************** -->
-<!-- @LZX_VERSION@ -->
\ No newline at end of file
+<!-- @LZX_VERSION@ -->
More information about the Laszlo-checkins
mailing list