Skip to content

Commit ae2d742

Browse files
committed
migrate to 0.29
1 parent ff06e5a commit ae2d742

File tree

4 files changed

+29
-59
lines changed

4 files changed

+29
-59
lines changed

Samples/Animation/TimelineWrap/MainView.ux

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<App Theme="Basic" Background="#446f">
1+
<App Background="#446f">
22
<Circle ux:Class="Dot" Width="15%" Height="15%" Alignment="TopLeft"
33
ux:Name="self" Anchor="50%,50%">
44
<double ux:Property="TimeOffset"/>

Samples/Animation/TimelineWrap/TimelineWrap.unoproj

+1-21
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,7 @@
11
{
22
"InternalsVisibleTo": [],
33
"Packages": [
4-
"Experimental.Http",
5-
"Fuse.Android",
6-
"Fuse.Android",
7-
"Fuse.Animations",
8-
"Fuse.BasicTheme",
9-
"Fuse.Controls",
10-
"FuseCore",
11-
"Fuse.Designer",
12-
"Fuse.Desktop",
13-
"Fuse.Drawing",
14-
"Fuse.Drawing.Planar",
15-
"Fuse.Drawing.Primitives",
16-
"Fuse.Effects",
17-
"Fuse.Elements",
18-
"Fuse.Entities",
19-
"Fuse.Gestures",
20-
"Fuse.iOS",
21-
"Fuse.Navigation",
22-
"Fuse.Reactive",
23-
"Fuse.Shapes",
24-
"Fuse.Triggers",
4+
"Fuse",
255
],
266
"Projects": [],
277
"Includes": [

Samples/Controls/Circular/Circular.unoproj

+1-23
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,7 @@
11
{
22
"RootNamespace":"",
33
"Packages": [
4-
"Experimental.Physics",
5-
"Fuse.Animations",
6-
"Fuse.BasicTheme",
7-
"Fuse.Themes",
8-
"Fuse.Controls",
9-
"Fuse.Designer",
10-
"Fuse.Drawing",
11-
"Fuse.Drawing.Primitives",
12-
"Fuse.Effects",
13-
"Fuse.Elements",
14-
"Fuse.Entities",
15-
"Fuse.Gestures",
16-
"Fuse.Navigation",
17-
"Fuse.Shapes",
18-
"Fuse.Triggers",
19-
"Fuse.Reactive",
20-
"Fuse.Android",
21-
"Fuse.Desktop",
22-
"Fuse.iOS",
23-
"Fuse.UserEvents",
24-
"FuseCore",
25-
"Uno.Collections",
26-
"Uno.Geometry"
4+
"Fuse",
275
],
286
"Includes": [
297
"*"

Samples/Controls/Circular/MainView.ux

+26-14
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<App Theme="Basic" ux:Class="Circular">
1+
<App ux:Class="Circular">
22
<Panel ux:Class="ClockTick" ux:Name="self">
33
<string ux:Property="Text"/>
44
<float ux:Property="ClockValue"/>
@@ -20,13 +20,27 @@
2020
<ClientPanel Background="0.8,0.8,0.8,1">
2121
<JavaScript>
2222
var Observable = require("FuseJS/Observable")
23-
23+
24+
function formatTime(x) {
25+
var q = x.toFixed(0)
26+
if (x < 10) {
27+
return "0" + q
28+
}
29+
return q
30+
}
31+
2432
exports.hoursX = Observable(0)
2533
exports.hoursY = Observable(0)
2634
exports.hours = Observable(function() {
2735
return exports.hoursX.value + exports.hoursY.value * 12
2836
})
37+
exports.displayHours = exports.hours.map(function(x) {
38+
return formatTime(x)
39+
})
2940
exports.minutes = Observable(0)
41+
exports.displayMinutes = exports.minutes.map(function(x) {
42+
return formatTime(x)
43+
})
3044

3145
exports.selectHour = function(args) {
3246
exports.hoursX.value = args.value%12
@@ -46,21 +60,19 @@
4660
</WhileTrue>
4761

4862
<Panel Dock="Top" Margin="0,0,0,10">
49-
<StackPanel Orientation="Horizontal" Alignment="Center">
50-
<Style>
51-
<Text FontSize="24" TextColor="0,0.5,0.8,1"/>
52-
</Style>
53-
<Number Value="{hours}" Format="00" Padding="10,0,10,0" HitTestMode="LocalBounds">
63+
<StackPanel Orientation="Horizontal" Alignment="Center" ItemSpacing="10">
64+
<Text ux:Class="ClockText" FontSize="24" TextColor="0,0.5,0.8,1"/>
65+
<ClockText Value="{displayHours}" HitTestMode="LocalBounds">
5466
<Tapped>
5567
<Set ShowMinutes.Value="false"/>
5668
</Tapped>
57-
</Number>
58-
<Text Value=":"/>
59-
<Number Value="{minutes}" Format="00" Padding="10,0,10,0" HitTestMode="LocalBounds">
69+
</ClockText>
70+
<ClockText Value=":"/>
71+
<ClockText Value="{displayMinutes}" HitTestMode="LocalBounds">
6072
<Tapped>
6173
<Set ShowMinutes.Value="true"/>
6274
</Tapped>
63-
</Number>
75+
</ClockText>
6476
</StackPanel>
6577
</Panel>
6678

@@ -77,10 +89,10 @@
7789
<ClockHand ux:Name="TheHourLine">
7890
<Rotation ux:Name="HourRotate"/>
7991
<Attractor Target="HourRotate.Degrees" Value="{Property HourSlide.DegreesValue}"
80-
SimulationType="SmoothSnapAngularDegrees"/>
92+
Type="SmoothSnap" Unit="Degrees"/>
8193

8294
<Attractor Target="TheHourLine.Width" ux:Name="HourLineAttractor"
83-
SimulationType="SmoothSnapPoints"/>
95+
Type="SmoothSnap" Unit="Points"/>
8496
<RangeAnimation Value="{Property HourSelect.ValueY}" Minimum="0" Maximum="1">
8597
<Change HourLineAttractor.Value="41.5"/>
8698
</RangeAnimation>
@@ -132,7 +144,7 @@
132144
<ClockHand Width="41.5%">
133145
<Rotation ux:Name="MinuteRotate"/>
134146
<Attractor Target="MinuteRotate.Degrees" Value="{Property MinuteSlide.DegreesValue}"
135-
SimulationType="SmoothSnapAngularDegrees"/>
147+
Type="SmoothSnap" Unit="Degrees"/>
136148
</ClockHand>
137149

138150
<Circle Layer="Background" Fill="1,1,1,1"/>

0 commit comments

Comments
 (0)