-
Notifications
You must be signed in to change notification settings - Fork 1
/
flex.js
63 lines (62 loc) · 2.54 KB
/
flex.js
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
// Flex layout page
//
exports.View =
{
title: "Flex",
elements:
[
// We're looking for this:
//
// R-- BBB
// -R- BRB
// --R BBB
// GGG GGG
// BBB RRR
// BBB GGG
// RRR BRB
// RRR BRB
// RRR BRB
// RRR RRR
// RRR RRR
// RRR RRR
//
{ control: "stackpanel", orientation: "Horizontal", contents: [
{ control: "stackpanel", orientation: "Vertical", height: 600, width: 150, margin: 0, contents: [
{ control: "rectangle", margin: 0, height: 50, width: 50, horizontalAlignment: "Left", color: "Red" },
{ control: "rectangle", margin: 0, height: 50, width: 50, horizontalAlignment: "Center", color: "Red" },
{ control: "rectangle", margin: 0, height: 50, width: 50, horizontalAlignment: "Right", color: "Red" },
{ control: "rectangle", margin: 0, height: 50, width: "*", color: "Green" },
{ control: "rectangle", margin: 0, height: "*", width: "*", color: "Blue" },
{ control: "rectangle", margin: 0, height: "3*", width: "*", color: "Red" },
]
},
{ control: "stackpanel", orientation: "Vertical", width: 150, margin: 0, contents: [
{ control: "border", height: 150, width: 150, margin: 0, background: "Blue", contents: [
{ control: "rectangle", height: 50, width: 50, margin: 0, horizontalAlignment: "Center", verticalAlignment: "Center", color: "Red" },
]
},
{ control: "border", height: 150, width: 150, margin: 0, background: "Green", contents: [
{ control: "rectangle", height: 50, width: "*", margin: 0, verticalAlignment: "Center", color: "Red" },
]
},
{ control: "border", height: 150, width: 150, margin: 0, background: "Blue", contents: [
{ control: "rectangle", height: "*", width: 50, margin: 0, horizontalAlignment: "Center", color: "Red" },
]
},
{ control: "border", height: 150, width: 150, margin: 0, contents: [
{ control: "rectangle", height: "*", width: "*", margin: 0, background: "Red", color: "Red" },
]
},
]
},
]
}
]
}
exports.InitializeViewModel = function (context, session)
{
var viewModel =
{
}
return viewModel;
}