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
1
vote
0 answers

Drag & Drop child node in Draw2d Custom Layout/Figure

I have a Draw2d(js) custom figure (Table) which contains nested custom figures (Column). I want to grag and drop column from one table to another. I just want from you guys some guidelines how to enable grag & drop, I'll handle other logic. I've…
Zohaib Ijaz
  • 21,926
  • 7
  • 38
  • 60
1
vote
0 answers

Draw2D.js : How to get JSON from 'HorizontalLayout' with child labels and how to restore 'HorizontalLayout' with label from JSON

I am newb to Draw2D.js, I have created 'HorizontalLayout' with three child label. and trying to get JSON for 'HorizontalLayout' with three child label. My code as following: HTML:
Mehul Mali
  • 3,084
  • 4
  • 14
  • 28
1
vote
3 answers

Installation of draw2D touch on Angular2

how can I install the draw2d touch library on Angular 2 ? I do not find any news about it. Thank you
uroti
  • 147
  • 1
  • 11
1
vote
2 answers

How to scroll my canvas while creating a connection in draw2d-js?

I have two figures, one in the visible area of my canvas and one outside (on the right). It is not possible to make a connection because I can't reach the other figure. Is it possible to autoscroll, to the right while creating a connection so I can…
Dreqnoid
  • 31
  • 7
1
vote
2 answers

How to create composite figures in draw2d.js

I've looked through the collection of examples, that go with the library, but unfortunatelly, all examples, devoted to composite figures, are based on parsing json file. reader.unmarshal(canvas, jsonDocument); However, what I want to see is how to…
Jacobian
  • 10,122
  • 29
  • 128
  • 221
1
vote
0 answers

draw2d.js canvas onDrop not fire

I'm try to build an example of drag&drop but without success: following my code Draggable object $("#foo").draggable({ appendTo:"body", stack:"body", zIndex: 27000, helper:"clone", drag:…
pepperav
  • 527
  • 6
  • 16
1
vote
1 answer

Convert rendered HTML 5 display (visible and invisible) to image when using HTML 5 canvas

Is there source code (or a browser plugin) to convert the contents of an HTML 5 web page to an image file? This would not just include the visible contents, but the hidden contents as well (assuming there were scroll bars in the page). If there…
JustBeingHelpful
  • 18,332
  • 38
  • 160
  • 245
1
vote
2 answers

Draw2d js: How can I keep the ports on the top of the figure?

After reading a lot in order to manipulate the position of the ports, I found another problem: when I select a port that is positioned below the figure, as shown in the images. My question is: How can I keep the ports on the top of the…
Andy.Diaz
  • 3,369
  • 2
  • 22
  • 24
1
vote
1 answer

Extjs 4 and Draw2D touch JavaScript GraphLib

i am trying to build an app with extjs 4 and draw2d touch library. the app has a two column panel. how can i drag a draw2d shape from one column and drop it in the other? Any help plis thanks
fon
  • 255
  • 2
  • 7
  • 16
1
vote
1 answer

How to listen to mouse events on canvas in Draw2D library?

I want to allow the user to draw a rectangle on the canvas with Draw2D library. The canvas location of mouse-down will be top-left and the canvas location of mouse-up should become the bottom right. However, I am unable to catch the mouse-up and…
1
vote
0 answers

draw2d touch in amd environment

I want to use Draw2D touch in an AMD environment. The library itself isn't AMD compliant but depends on some other - AMD compliant - libraries like Raphael and Shifty. So I set up a shim config for Draw2D (relevant parts…
Akos K
  • 7,071
  • 3
  • 33
  • 46
1
vote
1 answer

I can't close jQuery-ContextMenu using Draw2D touch

I'm using the JS GraphLib Draw2D and on onContextMenu event I append the jQuery-Menu and it appears but doesn't close! When I set autoHide or events I get the Uncaught RangeError: Maximum call stack size exceeded. Code: var LabelRectangle =…
Tarik
  • 146
  • 2
  • 8
1
vote
2 answers

draw2d javascript library - multiline label

Do you have an idea how to create a multiline label with draw2d's draw2d.shape.basic.Label
1
vote
1 answer

Draw2D: How to use a port as source/target for more than one connection?

So, I'm trying to build as a personal project my course curriculum and I decided to use Draw2D because I think it's pretty complete. I'm representing the courses as rectangles and setting connections between them to show which ones are…
rsalfonso
  • 95
  • 6
1
vote
2 answers

How to create two input ports and two output ports in diamond?

I want to create two input ports and two output ports, I have tried it in diamond shape as: this.createPort("input"); this.createPort("input"); this.createPort("output"); this.createPort("output"); but the above code doesn't work as required, it do…
JS Rocker
  • 148
  • 1
  • 1
  • 10