KineticJS Draggable State
HTML
<div id="container"></div>
<script src="http://www.html5canvastutorials.com/libraries/kinetic-v4.3.0-beta2.js"></script>
JavaScript
var stage = new Kinetic.Stage({
container: 'container',
width: 578,
height: 500
});
var layer = new Kinetic.Layer();
var circle = new Kinetic.Circle({
x: stage.getWidth() / 2,
y: stage.getHeight() / 2,
radius: 70,
fill: 'red',
stroke: 'black',
strokeWidth: 4,
draggable: true
});
// add the shape to the layer
layer.add(circle);
layer.add(circle.clone({x:100, y:100, fill:'blue'}));
// add the layer to the stage
stage.setDraggable(true);
stage.add(layer);