forked from Jasonette/Jasonpedia
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdynamic.json
154 lines (154 loc) · 4.27 KB
/
dynamic.json
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
{
"$jason": {
"head": {
"title": "Dynamic Layers",
"actions": {
"$load": {
"type": "$set",
"options": {
"style": {
"width": "86",
"height": "175",
"bottom": "70",
"left": "50%-43"
}
},
"success": {
"type": "$render"
}
},
"resizable": {
"type": "$set",
"options": {
"style": "{{var new_style = $get.style; new_style['resize']='true'; return new_style;}}"
},
"success": {
"type": "$util.banner",
"options": {
"title": "Now resizable",
"description": "Try pinching Mario with two fingers"
},
"success": {
"type": "$render"
}
}
},
"draggable": {
"type": "$set",
"options": {
"style": "{{var new_style = $get.style; new_style['move']='true'; return new_style;}}"
},
"success": {
"type": "$util.banner",
"options": {
"title": "Now draggable",
"description": "Try dragging Mario around"
},
"success": {
"type": "$render"
}
}
},
"rotatable": {
"type": "$set",
"options": {
"style": "{{var new_style = $get.style; new_style['rotate']='true'; return new_style;}}"
},
"success": {
"type": "$util.banner",
"options": {
"title": "Now rotatable",
"description": "Try rotating Mario with two fingers"
},
"success": {
"type": "$render"
}
}
}
},
"templates": {
"body": {
"style": {
"background": "https://jasonette.github.io/Jasonpedia/assets/mariobackground.jpg"
},
"header": {
"style": {
"background": "rgba(0,0,0,0)"
},
"menu": {
"text": "View JSON",
"href": {
"url": "https://github.com/Jasonette/Jasonpedia/blob/gh-pages/view/layer/dynamic.json",
"view": "web"
}
}
},
"layers": [{
"type": "label",
"text": "IN THIS DEMO, MARIO IS A DYNAMIC LAYER, WHICH MEANS YOU CAN RESIZE, DRAG, ROTATE HIM.\n\nBUT FIRST, PRESS THE BUTTONS TO ACTIVATE EACH FEATURE",
"style": {
"font": "Verdana",
"color": "#fdfdfd",
"size": "15",
"top": "100",
"left": "10%",
"width": "80%",
"height": "150",
"align": "center"
}
}, {
"type": "label",
"text": "Draggable",
"action": {
"trigger": "draggable"
},
"style": {
"align": "center",
"bottom": "30",
"left": "50%-50",
"width": "100",
"padding": "10",
"background": "#6e2111",
"color": "#ffffff",
"corner_radius": "3"
}
}, {
"type": "label",
"text": "Resizable",
"action": {
"trigger": "resizable"
},
"style": {
"align": "center",
"bottom": "30",
"right": "20",
"padding": "10",
"background": "#6e2111",
"color": "#ffffff",
"corner_radius": "3"
}
}, {
"type": "label",
"text": "Rotatable",
"action": {
"trigger": "rotatable"
},
"style": {
"align": "center",
"bottom": "30",
"left": "20",
"padding": "10",
"background": "#6e2111",
"color": "#ffffff",
"corner_radius": "3"
}
}, {
"type": "image",
"url": "https://jasonette.github.io/Jasonpedia/assets/0.png",
"style": "{{$get.style}}"
}]
}
}
}
}
}