HTMLcopy
1
<div id="container"></div>
CSScopy
6
1
html, body, #container {
2
width: 100%;
3
height: 100%;
4
margin: 0;
5
padding: 0;
6
}
JavaScriptcopy
x
1
var stage = acgraph.create('container');
2
3
// Dragging area display.
4
var rectangle = stage.rect(10, 10, 150, 120);
5
rectangle.fill('#FFEB3B 0.05');
6
7
var blueCircle = stage.circle(75, 75, 25);
8
blueCircle.fill('#2196F3');
9
10
// Sets dragging of an element.
11
blueCircle.drag(rectangle.getBounds());