[Laszlo-checkins] r9324 - openlaszlo/trunk/WEB-INF/lps/lfc/views
bargull@openlaszlo.org
bargull at openlaszlo.org
Sat May 24 14:36:56 PDT 2008
Author: bargull
Date: 2008-05-24 14:36:54 -0700 (Sat, 24 May 2008)
New Revision: 9324
Modified:
openlaszlo/trunk/WEB-INF/lps/lfc/views/LzText.lzs
Log:
Change 20080524-bargull-Ur0 by bargull at dell--p4--2-53 on 2008-05-24 23:32:24
in /home/Admin/src/svn/openlaszlo/trunk
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: make font-attributes constrainable again
New Features:
Bugs Fixed: LPP-6038
Technical Reviewer: ptw
QA Reviewer: promanik
Doc Reviewer: (pending)
Documentation:
Release Notes:
Details:
Font attribute (fontname, fontsize, fontstyle) are special cased in "LzText#construct(..)". And since constraints are no longer held in the $refs object, the special casing need to be adjusted.
Tests:
Modified: openlaszlo/trunk/WEB-INF/lps/lfc/views/LzText.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/views/LzText.lzs 2008-05-24 21:23:13 UTC (rev 9323)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/views/LzText.lzs 2008-05-24 21:36:54 UTC (rev 9324)
@@ -286,21 +286,22 @@
this.sizeToHeight = false;
- this.fontname = ('font' in args) ? args.font : this.searchParents( "fontname" ).fontname ;
- this.fontsize = ('fontsize' in args) ? args.fontsize : this.searchParents( "fontsize" ).fontsize ;
- this.fontstyle = ('fontstyle' in args) ? args.fontstyle : this.searchParents( "fontstyle" ).fontstyle ;
+ //need to save three different states, so use null and undefined and rely on null !== undefined
+ var argfname = ('font' in args) ? (args.font is LzInitExpr) ? args.font : null : void(0);
+ var argfsize = ('fontsize' in args) ? (args.fontsize is LzInitExpr) ? args.fontsize : null : void(0);
+ var argfstyle = ('fontstyle' in args) ? (args.fontstyle is LzInitExpr) ? args.fontstyle : null : void(0);
+
+ this.fontname = args.font = (argfname === null ? args.font : this.searchParents( "fontname" ).fontname);
+ this.fontsize = args.fontsize = (argfsize === null ? args.fontsize : this.searchParents( "fontsize" ).fontsize);
+ this.fontstyle = args.fontstyle = (argfstyle === null ? args.fontstyle : this.searchParents( "fontstyle" ).fontstyle);
- args.font = this.fontname;
- args.fontsize = this.fontsize;
- args.fontstyle = this.fontstyle;
var tsprite:LzTextSprite = (this.sprite cast LzTextSprite);
tsprite.__initTextProperties(args);
- args.font = LzNode._ignoreAttribute;
- args.fontsize = LzNode._ignoreAttribute;
- args.fontstyle = LzNode._ignoreAttribute;
+ args.font = argfname == null ? argfname : LzNode._ignoreAttribute;
+ args.fontsize = argfsize == null ? argfsize : LzNode._ignoreAttribute;
+ args.fontstyle = argfstyle == null ? argfstyle : LzNode._ignoreAttribute;
- //this.callInherited( "construct", arguments.callee , parent , args );
this.yscroll = 0;
this.xscroll = 0;
More information about the Laszlo-checkins
mailing list