[Laszlo-checkins] r6402 - openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/kernel/swf

ptw@openlaszlo.org ptw at openlaszlo.org
Fri Sep 7 13:40:57 PDT 2007


Author: ptw
Date: 2007-09-07 13:40:55 -0700 (Fri, 07 Sep 2007)
New Revision: 6402

Modified:
   openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/kernel/swf/LzSprite.as
Log:
Change 20070907-ptw-r by ptw at dueling-banjos.local on 2007-09-07 15:16:36 EDT
    in /Users/ptw/OpenLaszlo/wafflecone
    for http://svn.openlaszlo.org/openlaszlo/branches/wafflecone

Summary: Corner case for stretches with no resource

Bugs Fixed:
LPP-4661 'View with stretches="both" does not get onclick'

Technical Reviewer: max (Message-ID: <46E1B428.4060901 at openlaszlo.org>)
QA Reviewer: pkang (pending)

Details:
    If there is no resource the default dimension is 100 for unscaling
    the button

Tests:
    Test case from bug works correctly.



Modified: openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/kernel/swf/LzSprite.as
===================================================================
--- openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/kernel/swf/LzSprite.as	2007-09-07 20:08:13 UTC (rev 6401)
+++ openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/kernel/swf/LzSprite.as	2007-09-07 20:40:55 UTC (rev 6402)
@@ -818,10 +818,11 @@
 LzSprite.prototype._setButtonSize = function ( axis , bsize ){
     var sc ="_" + ( axis =="width" ? "x" : "y" ) + "scale" ;
     if ( this[ "_setresc" + axis ] && this[ 'hasset' + axis ]){
-        this.__LZbuttonRef[ sc ] = this.__LZmovieClipRef[ "_" + axis ] /
-                            ( this.__LZmovieClipRef[ sc ] / 100 ) ;
+        var resdim = this.__LZmovieClipRef[ "_" + axis ];
+        if (resdim == 0) { resdim = 100; }
+        this.__LZbuttonRef[ sc ] = resdim / ( this.__LZmovieClipRef[ sc ] / 100 ) ;
     } else {
-        this.__LZbuttonRef[ sc ] = ( 100 / this.__LZmovieClipRef[ sc ] )*bsize;
+        this.__LZbuttonRef[ sc ] = ( 100 / this.__LZmovieClipRef[ sc ] ) * bsize;
     }
 }
 



More information about the Laszlo-checkins mailing list