Awesome library! :D -Wish I was good enough at javascript to help out with it.. hope to be, one day!
-Love it, and am using it to make a graphical IDE for prolog programming, where you program by drawing out shapes from a palette, filling them with data and then generating code from that. -Would not be possible without your library!
A funnyness that I encountered, though: When showing a grid in the background, this grid is shown as superimposed above any Raft figure that I add.
-and then put the below code in the code-editor of the example, and you will see what I mean:
(also, any connections that are drawn to the Raft appear to be behind the grid)
canvas.installEditPolicy(new draw2d.policy.canvas.ShowGridEditPolicy());
var shape = new draw2d.shape.basic.Text({text:"This is a simple text in a canvas with grid background."});
canvas.add(shape,40,10);
var rect1 = new draw2d.shape.composite.Raft({width:200, height:100});
var rect2 = new draw2d.shape.basic.Rectangle({width:50, height:50});
Awesome library! :D -Wish I was good enough at javascript to help out with it.. hope to be, one day! -Love it, and am using it to make a graphical IDE for prolog programming, where you program by drawing out shapes from a palette, filling them with data and then generating code from that. -Would not be possible without your library!
A funnyness that I encountered, though: When showing a grid in the background, this grid is shown as superimposed above any Raft figure that I add.
To replicate, go to http://www.draw2d.org/draw2d_touch/jsdoc_6/#!/api/draw2d.policy.canvas.ShowGridEditPolicy
-and then put the below code in the code-editor of the example, and you will see what I mean: (also, any connections that are drawn to the Raft appear to be behind the grid)
canvas.installEditPolicy(new draw2d.policy.canvas.ShowGridEditPolicy()); var shape = new draw2d.shape.basic.Text({text:"This is a simple text in a canvas with grid background."});
canvas.add(shape,40,10); var rect1 = new draw2d.shape.composite.Raft({width:200, height:100}); var rect2 = new draw2d.shape.basic.Rectangle({width:50, height:50});
canvas.add(rect1,10,10); canvas.add(rect2,20,20);
rect2.attr({bgColor:"#f0f000", width:50, height:50, radius:10});
canvas.setCurrentSelection(rect1);