After updating to fuse 1.3.0, using SeekToPath on a PageControl doesn’t seem to work as intended. The PageControl will jump to the appropriate slide, but the ActiveIndex will not change. The example below illustrates the issue:
<App>
<JavaScript>
var Observable = require("FuseJS/Observable");
var active = Observable();
module.exports = {
active: active,
goto2: function() {
pageControl.seekToPath("slide2");
//active.value = 2;
}
}
</JavaScript>
<DockPanel>
<Panel Padding="20" Dock="Top">
<Button Text="Jump to slide 2" Alignment="Left" Clicked="{goto2}"></Button>
<Text Alignment="Right">active={{active}}</Text>
</Panel>
<PageControl ux:Name="pageControl" ClipToBounds="true" ActiveIndex="{active}">
<NavigationMotion GotoType="SmoothSnap" />
<Panel Background="#fee" Name="slide0">
<Text FontSize="30" Alignment="Center" Value="0"/>
</Panel>
<Panel Background="#efe" Name="slide1">
<Text FontSize="30" Alignment="Center" Value="1"/>
</Panel>
<Panel Background="#eef" Name="slide2">
<Text FontSize="30" Alignment="Center" Value="2"/>
</Panel>
<Panel Background="#ffe" Name="slide3">
<Text FontSize="30" Alignment="Center" Value="3"/>
</Panel>
<Panel Background="#eff" Name="slide4">
<Text FontSize="30" Alignment="Center" Value="4"/>
</Panel>
</PageControl>
</DockPanel>
</App>
I saw there were some changes related to it in the changelog, but I couldn’t make much sense of them.
in the goto2
function, if you decomment the active.value = 2;
line something weird happens: the ActiveIndex is set to the correct value but only AFTER I press the button twice, for some reason.
What I need is an updated ActiveIndex after using seekToPath
Fuse version: 1.3.0 build 14520
OS version: Windows 10
Tested on both the emulator and a phone