[Laszlo-checkins] r16750 - in openlaszlo/trunk: WEB-INF/lps/lfc/kernel/swf9 test/tlf

hqm@openlaszlo.org hqm at openlaszlo.org
Fri Jun 18 14:31:56 PDT 2010


Author: hqm
Date: 2010-06-18 14:31:54 -0700 (Fri, 18 Jun 2010)
New Revision: 16750

Modified:
   openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzTLFInputTextSprite.as
   openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzTLFTextSprite.as
   openlaszlo/trunk/test/tlf/tlftext2.lzx
Log:
Change 20100618-hqm-Y by hqm at localhost on 2010-06-18 14:31:25 PDT
    in /Users/hqm/openlaszlo/trunk2
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary:  fix click transparency on tlf text

New Features:

Bugs Fixed:

Technical Reviewer: (pending)
QA Reviewer: (pending)
Doc Reviewer: (pending)

Documentation:

Release Notes:

Overview:
    

Details:
    

Tests:



Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzTLFInputTextSprite.as
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzTLFInputTextSprite.as	2010-06-18 20:08:49 UTC (rev 16749)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzTLFInputTextSprite.as	2010-06-18 21:31:54 UTC (rev 16750)
@@ -61,6 +61,8 @@
         public function LzTLFInputTextSprite (newowner:LzView = null, args:Object = null) {
             super(newowner,args);
             tcm.editingMode = EditingMode.READ_WRITE;
+            container.mouseChildren = true;
+            container.mouseEnabled = true;
         }
 
         /**

Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzTLFTextSprite.as
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzTLFTextSprite.as	2010-06-18 20:08:49 UTC (rev 16749)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzTLFTextSprite.as	2010-06-18 21:31:54 UTC (rev 16750)
@@ -104,6 +104,7 @@
         public var undoManager:UndoManager = null;
         public var tcm:LzTextContainerManager;
         public var textFlow:TextFlow;
+        // The text sprite layout puts its stuff in here
         public var container:Sprite; 
 
         public static const TEXTPADDING = 2;
@@ -112,6 +113,9 @@
         public function LzTLFTextSprite (newowner:LzView = null, args:Object = null) {
             super(newowner,false);
             container = new Sprite();
+            container.mouseChildren  = false;
+            container.mouseEnabled  = false;
+            
             // add container to the stage; create controller and add it to the text flow
             addChild(container);
             this.config = ((TextContainerManager.defaultConfiguration) as Configuration).clone();
@@ -181,6 +185,8 @@
         override public function setClickable( c:Boolean ):void {
             if (this.clickable == c) return;
             //setShowHandCursor(c);
+            container.mouseChildren = c || selectable;
+            container.mouseEnabled = c || selectable;
             this.clickable = c;
         }
 
@@ -465,6 +471,8 @@
         public function setSelectable ( isSel:Boolean ):void {
             if (this.selectable == isSel) return;
             this.selectable = isSel;
+            container.mouseChildren = isSel || clickable;
+            container.mouseEnabled = isSel || clickable;
             tcm.editingMode = EditingMode.READ_SELECT;
             // TODO [hqm 2010-06] will this be sufficient to force the cursor to change?
             tcm.updateContainer();

Modified: openlaszlo/trunk/test/tlf/tlftext2.lzx
===================================================================
--- openlaszlo/trunk/test/tlf/tlftext2.lzx	2010-06-18 20:08:49 UTC (rev 16749)
+++ openlaszlo/trunk/test/tlf/tlftext2.lzx	2010-06-18 21:31:54 UTC (rev 16750)
@@ -2,18 +2,19 @@
   <debug  fontsize="12"/>
 <simplelayout axis="x" spacing="4"/>
 <view  layout="spacing:4">
-  <tlftext 
+  <tlfinputtext 
            id="k" 
            bgcolor="#ccccaa" 
            fgcolor="red" 
            font="Verdana"
+
            fontsize="24"
-          width="500" >This is some <i>sample <b>text</b></i>. The quick brown dog, etc.
-  </tlftext>
+ >This is some <i>sample <b>text</b></i>. The quick brown dog, etc.
+  </tlfinputtext>
 
 
-<button onclick="k.sprite.setEditable(true)">make editable</button>
-<button onclick="k.sprite.setEditable(false)">make uneditable</button>
+<button onclick="k.sprite.setEnabled(true)">make editable</button>
+<button onclick="k.sprite.setEnabled(false)">make uneditable</button>
 <button onclick="k.sprite.setSelectable(true)">make selectable</button>
 <button onclick="k.sprite.setSelectable(false)">make unselectable</button>
 </view>



More information about the Laszlo-checkins mailing list