Questions tagged [draw2d-js]

Draw2D is a JavaScript/HTML5 library for canvas development. Based on JQuery and RaphaelJS, it is platform independent, cross-browser and device.

Draw2D is a JavaScript/HTML5 library for canvas development. Based on JQuery and RaphaelJS, it is platform independent, cross-browser and device. Available at http://www.draw2d.org

58 questions
0
votes
1 answer

Layout and rotating a shape

Is it possible, to rotate a shape inside another shape with CenterLocator? var shelvingCode = new draw2d.shape.basic.Label({ text: '1.01' }); myShape.add(this.shelvingCode, new draw2d.layout.locator.CenterLocator()); I tried to use the special…
shkiper
  • 297
  • 2
  • 12
0
votes
1 answer

Fill a path node in Draw2d touch

Im trying to make an arrow joining a rect and a path (triangle). This is my code: var svgCarga = [ '', '
Andy.Diaz
  • 3,369
  • 2
  • 22
  • 24
0
votes
1 answer

Is there any Draw2d.js canvas destroy method?

I have a question about Draw2D.js. I'm resizing the Canvas by using JQuery-ui, but when I resize the canvas I have to destroy it and create a new one ... Otherwise I'll have many canvases overlapping. If I call canvas.destroy() nothing works (as…
B. Youcef
  • 48
  • 3
0
votes
0 answers

Private variable is being shared across multiple instances of a class

I have a small problem using private variables in a JavaScript function. This software depends on draw2d, a rendering library for javascript. The library forces you to use John Resig's implementation of Class.js, which allows for simple Java like…
0
votes
1 answer

Draw2d C# MVC Post JSON to Controller

I am working with the Draw2D library which allows for exporting of the JSON but when I try to do it I cannot get it to export to MVC. This is not an issue with Draw2D but rather lack of knowledge by me as to how to get it to work. I generate the…
scripter78
  • 1,117
  • 3
  • 22
  • 50
0
votes
1 answer

Draw2D Set Position

I am new to this library and cannot seem to find anything that gives good detail on how to size and position the canvas. Hopefully someone here can direct me in the best way of positioning the canvas $(window).load(function () { // create…
scripter78
  • 1,117
  • 3
  • 22
  • 50
0
votes
1 answer

How to properly make one figure child on another in Draw2D Touch

I'm using Draw2D to render diagram. I'm rendering parent rectangles and child rectangles: var parent = new draw2d.shape.basic.Rectangle(90, 30); var child1 = new draw2d.shape.basic.Rectangle(30, 30); var child2 = new…
Marboni
  • 2,399
  • 3
  • 25
  • 42
0
votes
0 answers

I want Tooltip functionality in draw2d 2.3.0?

Please provide me tooltip functionality in 2.3.0. As Library change will effect other parts of the application. So I need to have that functionality in this library itself. Thanks in advance.
JS Rocker
  • 148
  • 1
  • 1
  • 10
0
votes
1 answer

Resize listener for Draw2d Touch

Forgive me if this is a dumb question, I'm a newbie with Draw2d Touch (http://www.draw2d.org/). I need to attach a listener to a Rectangle to notify me when the Rectangle is being resized. I have searched the API but I haven't found anything…
user1294431
  • 635
  • 1
  • 6
  • 18
0
votes
1 answer

Resizeable but not draggable in draw2dTouch

I have tried somthing like this in draw2dTouch: this.setSelectable(true); this.setDraggable(false); this.setResizeable(true); but the behaviour is not expected as it should be. So please check if this is the library bug due to new release. Because…
JS Rocker
  • 148
  • 1
  • 1
  • 10
0
votes
1 answer

How to set z-index in draw2dTouch/Graphiti?

Ho can I set the z-index of any shape or element in draw2dTouch/Graphiti. Please help me as soon as possible.
JS Rocker
  • 148
  • 1
  • 1
  • 10
0
votes
1 answer

how to delete a connection in draw2d?

I want to know how I delete a connection in draw2d. I tried disconnect() method but dose not seems to be work. This is my code menu.appendMenuItem(new draw2d.MenuItem("Disconnect", null, function() { …
0
votes
3 answers

How to add figure at particular location in draw2d?

I want to add label at start or end position of connection. But here I did not found locator except ManhattanMidpointLocator. So how can I do this? How can I place label at where on connection? Please find my code as below, draw2d.LabelConnection =…
1 2 3
4