History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: LPP-4571
Type: Bug Bug
Status: Verified Verified
Resolution: Fixed
Priority: P1 P1
Assignee: Unassigned
Reporter: Maynard Demmon
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
OpenLaszlo

Text component not sized correctly when fontsize configured via a constraint

Created: 23/Aug/07 03:31 PM   Updated: 22/Oct/07 11:00 AM
Component/s: LFC - Constraints, LFC - Text
Affects Version/s: 4.0.5WaffleCone
Fix Version/s: 4.0.5WaffleCone

Time Tracking:
Not Specified

File Attachments: 1. File LPP-4571.lzx (0.5 kb)

Environment: WinXP with Firefox 2.0 with Flash Player 9 with lzr=swf8.

Severity: Minor
Fixed in Change#: 6,257
Runtime: N/A
Fix in hand: False


 Description  « Hide
The second first text component in the following test case is not sized correctly for the text it contains. This seems to be a result of the fontsize being set via a constraint.

<canvas height="100%" width="100%" proxied="false">
    <node id="foo">
        <method name="init">
            this.FONT_SIZE = 18;
        </method>
    </node>
    
    <!-- Line to show where things should line up. -->
    <view x="70" width="1" height="100" bgcolor="black"/>
    
    <!-- Wrong height and width -->
    <text text="TEST"
        x="${70 - this.width}" y="10"
        bgcolor="red" fontsize="$once{foo.FONT_SIZE}"
    />
    
    <!-- Correct height and width -->
    <text text="TEST"
        x="${70 - this.width}" y="50"
        bgcolor="red" fontsize="18"
    />
</canvas>

 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Maynard Demmon - 23/Aug/07 03:34 PM
Here is a slightly simpler test case that also shows the issue. I changed the $once constraint to $ and used setAttribute rather than a direct assignment.

<canvas height="100%" width="100%" proxied="false">
    <node id="foo">
        <method name="init">
            this.setAttribute('FONT_SIZE', 18);
        </method>
    </node>
    
    <!-- Line to show where things should line up. -->
    <view x="70" width="1" height="100" bgcolor="black"/>
    
    <!-- Wrong height and width -->
    <text text="TEST"
        x="${70 - this.width}" y="10"
        bgcolor="red" fontsize="${foo.FONT_SIZE}"
    />
    
    <!-- Correct height and width -->
    <text text="TEST"
        x="${70 - this.width}" y="50"
        bgcolor="red" fontsize="18"
    />
</canvas>

Steve O'Sullivan - 22/Oct/07 10:59 AM
This is the second, simpler test case from this bug.

Steve O'Sullivan - 22/Oct/07 11:00 AM
This was tested in build 6938 trunk, compiled as swf8 in Firefox 2.0.0.8. Text is sized appropriately in both views.