-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsvgAll.html
More file actions
37 lines (31 loc) · 1.02 KB
/
svgAll.html
File metadata and controls
37 lines (31 loc) · 1.02 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
<!DOCTYPE html>
<html>
<head>
<title>Hello Qunee for HTML5</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1, maximum-scale=1">
</head>
<body style="margin: 0px">
<div style="position: absolute; width: 100%; top: 0px; bottom: 0px;" id="canvas"></div>
<script src="http://demo.qunee.com/lib/qunee-min.js"></script>
<script src="resource/svg/svgAll.js"></script>
<script>
var graph = new Q.Graph('canvas');
graph.moveToCenter();
var x = 0, y = 0;
for(var name in SVGIcons){
var node = graph.createNode(name.substring(0, name.indexOf('.svg')), x, y);
node.image = name;
// node.setStyle(Q.Styles.RENDER_COLOR, Q.randomColor())
node.setStyle(Q.Styles.IMAGE_BACKGROUND_COLOR, "#2898E0");
node.setStyle(Q.Styles.IMAGE_PADDING, 5);
x += 100;
if(x > 600){
x = 0;
y += 100;
}
}
</script>
</body>
</html>