ShadowEditor/ShadowEditor.SVG/test2/07 SvgPolygonTest.html
2018-11-07 12:24:38 +08:00

42 lines
1022 B
HTML

<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta charset="utf-8">
<title>07 SvgPolygonTest</title>
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
</head>
<body>
<script src="../dist/ShadowEditor.SVG.js"></script>
<script>
var dom = UI.create({
xtype: 'svgdom',
id: 'svg1',
parent: document.body,
attr: {
width: 800,
height: 600,
},
children: [{
xtype: 'svgpolygon',
attr: {
points: [0, 0, 10, 30, 40, 60, 200, 100],
stroke: '#f00',
'stroke-width': 2,
fill: '#f00'
},
listeners: {
click: () => {
alert('You clicked!');
}
}
}]
});
dom.render();
</script>
</body>
</html>