Each and Viewport : elements disapear

Hi,

I ran into a problem with <Viewport>. Let’s create an Observable of a few items, and iterate with <Each> to display them… in a Viewport. Everything was fine until that 3 last words that makes our elements disappear.

EDIT : You need an Observable, it works fine with <Each Count="3">.

Test case :

MainView.ux

<App Theme="Basic" Background="#eeeeeeff">
    <JavaScript File="MainView.js" />
    <!-- <Viewport> Add this and break everything ! -->
        <StackPanel>
            <Each Items="{items}">
                <Rectangle Height="100" Width="100" Margin="10" Fill="#00f" />
            </Each>
        </StackPanel>
    <!-- </Viewport> -->
</App>

MainView.js

var Observable = require('FuseJS/Observable');

var items = Observable('a', 'b', 'c');

module.exports = {
    items: items
};

EDIT : Adding a <Panel> around each <Rectangle/> doesn’t fix it.

There seems to be an issue with layout invalidation. If you resize the window (or rotate device) the rectangles appear in the viewport.

I’ll create an issue for this and look to fix it.

I’ve fixed the issue. It’ll be available in an upcoming release.

Nice !

Thanks :slight_smile:

Fixed (at least works fine with this test case) in 0.9.4

Thanks !

In 0.20.3 this problem happen again!!!

This is a regression in 0.20.3. I have filed a ticket for this. Will update this thread when its resolved

This bug has been fixed. It will be included in the next release (not the upcoming one scheduled for this week)

Good news! The fix will make it into this weeks release

Vegard Strand Lende wrote:

Good news! The fix will make it into this weeks release

Thanks!!!