Author: pbr Date: 2007-09-01 10:21:05 -0700 (Sat, 01 Sep 2007) New Revision: 6321
Modified: openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/kernel/swf/LzTextSprite.as Log: Change 20070901-Philip-6 by [EMAIL PROTECTED] on 2007-09-01 10:29:16 EDT in /cygdrive/f/laszlo/svn/src/svn/openlaszlo/branches/wafflecone for http://svn.openlaszlo.org/openlaszlo/branches/wafflecone Summary: Fix inputtext size UPDATE New Features: Bugs Fixed: LPP-4626 Technical Reviewer: max QA Reviewer: hqm Doc Reviewer: (pending) Documentation: Release Notes: Details: LzTextSprite.getTextfieldHeight reuses the textclip to determine the height. How ever, it was not resetting the width when it was finished. This change caches/re stores a few parameters so that the textclip is restored to its original value. Some of these changes may not strictly be necessary but it is a safe change.s Tests: This inputtext should be clickable anywhere along the width: <canvas> <inputtext bgcolor="yellow"/> </canvas> Also main.lzx runs as expected Files: M WEB-INF\lps\lfc\kernel\swf\LzTextSprite.as Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20070901-Philip-6.tar Modified: openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/kernel/swf/LzTextSprite.as =================================================================== --- openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/kernel/swf/LzTextSprite.as 2007-09-01 16:50:40 UTC (rev 6320) +++ openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/kernel/swf/LzTextSprite.as 2007-09-01 17:21:05 UTC (rev 6321) @@ -257,13 +257,21 @@ return this.__LZtextclip._height } else { var textclip = this.__LZtextclip; + + // Cache current values + var tcw = textclip._width; + var tch = textclip._height; + var tca = textclip.autoSize; + var tct = textclip.htmlText; + textclip.autoSize = true; textclip.htmlText = this.format + "__ypgSAMPLE__" + this.closeformat; - var h = textclip._height; - textclip.htmlText = this.format + this.text + this.closeformat; - textclip.autoSize = this.resize; + textclip.autoSize = tca; + textclip.htmlText = tct; + textclip._width = tcw; + textclip._height = tch; } return h; } _______________________________________________ Laszlo-checkins mailing list [email protected] http://www.openlaszlo.org/mailman/listinfo/laszlo-checkins
