-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
50 lines (39 loc) · 1.23 KB
/
index.html
File metadata and controls
50 lines (39 loc) · 1.23 KB
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
<!DOCTYPE html>
<html>
<head>
<title></title>
<script type="text/javascript"
src="js/zebra/zebra.js">
</script>
</head>
<body style="margin: 0;">
<canvas id="ui.mix"></canvas>
<div id="zebra.fm"></div>
<script type="text/javascript">
zebra.ready(function() {
if (zebra.ui.$detectZCanvas("ui.mix") != null) return;
var canvas = document.getElementById("ui.mix");
canvas.width = window.innerWidth;
canvas.height = window.innerHeight;
//var context = canvas.getContext("2d");
//context.strokeStyle = 'red';
//context.beginPath();
//context.rect(0, 0, canvas.width, canvas.height);
//context.stroke();
var root = (new zebra.ui.zCanvas("ui.mix")).root;
root.properties({
layout : new zebra.layout.BorderLayout(8,8),
border : new zebra.ui.Border(),
padding: 8,
kids: {
CENTER: new zebra.ui.TextField("Hi ...n", true),
BOTTOM: new zebra.ui.Button("Clear").properties({ canHaveFocus: false })
}
});
root.find("//Button")._.add(function() {
root.find("//TextField").setValue("");
});
});
</script>
</body>
</html>