Skip to content

Instantly share code, notes, and snippets.

@ghillairet
Created January 21, 2013 14:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ghillairet/4586443 to your computer and use it in GitHub Desktop.
Save ghillairet/4586443 to your computer and use it in GitHub Desktop.
var SampleDiagram = Ds.Diagram.extend({
el: 'canvas'
});
var Circle = Ds.Shape.extend({
figure: {
type: 'circle',
r: 30,
fill: 'red',
stroke: 'rgb(120, 120, 200)',
'stroke-width': 2
}
});
var d = new SampleDiagram({ width: 1200, height: 800 });
var c = new Circle({ x: 100, y: 200, diagram: d });
d.render();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment