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.