forked from fuse-open/fuse-samples
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMainView.ux
37 lines (32 loc) · 1004 Bytes
/
MainView.ux
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<App Background="#FFF">
<ClientPanel>
<Grid ColumnCount="2">
<NumberEntry Alignment="Center" />
<!-- an example of reusing the NumberPad component -->
<StackPanel Padding="5" ItemSpacing="5" Color="#AAA" Alignment="Center">
<JavaScript>
var Observable = require("FuseJS/Observable");
var current = Observable(" ");
function selected(args) {
current.value = args.number;
oneShot.pulseBackward();
};
module.exports = {
current: current,
selected: selected
};
</JavaScript>
<Panel Padding="5">
<Rectangle Layer="Background" Color="#FFF" CornerRadius="50" />
<Text ux:Name="oneShotText" TextAlignment="Center" FontSize="80" Value="{current}" Opacity="0" />
<Timeline ux:Name="oneShot">
<Change oneShotText.Opacity="1" Duration="0.7"/>
</Timeline>
</Panel>
<NumberPad>
<NumberSelected Handler="{selected}"/>
</NumberPad>
</StackPanel>
</Grid>
</ClientPanel>
</App>