Revision: 4287
          http://vexi.svn.sourceforge.net/vexi/?rev=4287&view=rev
Author:   clrg
Date:     2011-10-20 00:49:15 +0000 (Thu, 20 Oct 2011)
Log Message:
-----------
Fix textalign property

Modified Paths:
--------------
    trunk/org.vexi-vexi.widgets/src_main/org/vexi/lib/layout/editbox.t
    trunk/org.vexi-vexi.widgets/src_main/org/vexi/lib/text/block.t
    trunk/org.vexi-vexi.widgets/src_main/org/vexi/lib/text/default.t

Modified: trunk/org.vexi-vexi.widgets/src_main/org/vexi/lib/layout/editbox.t
===================================================================
--- trunk/org.vexi-vexi.widgets/src_main/org/vexi/lib/layout/editbox.t  
2011-10-18 00:45:16 UTC (rev 4286)
+++ trunk/org.vexi-vexi.widgets/src_main/org/vexi/lib/layout/editbox.t  
2011-10-20 00:49:15 UTC (rev 4287)
@@ -1,4 +1,4 @@
-<!-- Copyright 2009 - see COPYING for details [LGPL] -->
+<!-- Copyright 2011 - see COPYING for details [LGPL] -->
 
 <vexi xmlns:ui="vexi://ui" xmlns:meta="vexi://meta" xmlns="org.vexi.lib.text">
     <meta:doc>

Modified: trunk/org.vexi-vexi.widgets/src_main/org/vexi/lib/text/block.t
===================================================================
--- trunk/org.vexi-vexi.widgets/src_main/org/vexi/lib/text/block.t      
2011-10-18 00:45:16 UTC (rev 4286)
+++ trunk/org.vexi-vexi.widgets/src_main/org/vexi/lib/text/block.t      
2011-10-20 00:49:15 UTC (rev 4287)
@@ -13,6 +13,17 @@
     
     <ui:box align="topleft" layout="layer">
         
+        thisbox.ALIGN_LEFT = true;
+        thisbox.ALIGN_RIGHT = false;
+        
+        thisbox.fontheight = vexi.ui.font.height(font, fontsize, "dy");
+        thisbox.minheight = fontheight;
+        thisbox.mWord;         // word currently occupied by mouse cursor
+        thisbox.textalign;     // alignment of block text - null === default
+        thisbox.textcolorset;  // whether textcolor has been manually set
+        thisbox.wordargs = [thisbox];
+        thisbox.wrapwidth = 0;
+        
         // apply traps useful to the constructor
         thisbox.textalign ++= static.textalignWrite;
         thisbox.wrapwidth ++= static.wrapwidthWrite;
@@ -33,17 +44,6 @@
             wrapwidth = arg0.wrapwidth;
         }
         
-        thisbox.fontheight = vexi.ui.font.height(font, fontsize, "dy");
-        thisbox.minheight = fontheight;
-        thisbox.mWord;         // word currently occupied by mouse cursor
-        thisbox.textalign;     // alignment of block text - null === default
-        thisbox.textcolorset;  // whether textcolor has been manually set
-        thisbox.wordargs = [thisbox];
-        thisbox.wrapwidth = 0;
-        
-        thisbox.ALIGN_LEFT = true;
-        thisbox.ALIGN_RIGHT = false;
-        
         // assign static trap functions
         thisbox.font      ++= static.fontpropWrite;
         thisbox.font      ++= static.propagateOnWrite;
@@ -53,7 +53,6 @@
         thisbox.edit      ++= static.propagateOnWrite;
         thisbox.reflowbox ++= static.invokeReflow;
         thisbox.textalign ++= static.invokeReflow;
-        thisbox.textalign ++= static.textalignWrite;
         thisbox.text      ++= static.textRead;
         thisbox.text      ++= static.textWrite;
         thisbox.textcolor ++= static.textcolorWrite;
@@ -242,21 +241,22 @@
     /** trap to set the textual alignment of this block */
     static.textalignWrite = function(v) {
         cascade = v;
-        switch(v) {
-            case "left":
-            trapee.ALIGN_LEFT = true;
-            trapee.ALIGN_RIGHT = false;
-            break;
-            
-            case "center":
+        switch (v) {
+        case "center":
             trapee.ALIGN_LEFT = false;
             trapee.ALIGN_RIGHT = false;
             break;
             
-            case "right":
+        case "right":
             trapee.ALIGN_LEFT = false;
             trapee.ALIGN_RIGHT = true;
             break;
+        
+        case "left":
+        default:
+            trapee.ALIGN_LEFT = true;
+            trapee.ALIGN_RIGHT = false;
+            break;
         }
     }
     

Modified: trunk/org.vexi-vexi.widgets/src_main/org/vexi/lib/text/default.t
===================================================================
--- trunk/org.vexi-vexi.widgets/src_main/org/vexi/lib/text/default.t    
2011-10-18 00:45:16 UTC (rev 4286)
+++ trunk/org.vexi-vexi.widgets/src_main/org/vexi/lib/text/default.t    
2011-10-20 00:49:15 UTC (rev 4287)
@@ -1,4 +1,4 @@
-<!-- Copyright 2009 - see COPYING for details [LGPL] -->
+<!-- Copyright 2011 - see COPYING for details [LGPL] -->
 
 <vexi xmlns:ui="vexi://ui" xmlns:meta="vexi://meta" xmlns="org.vexi.lib">
     <meta:doc>

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Ciosco Self-Assessment and learn 
about Cisco certifications, training, and career opportunities. 
http://p.sf.net/sfu/cisco-dev2dev
_______________________________________________
Vexi-svn mailing list
Vexi-svn@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/vexi-svn

Reply via email to