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

draw2d: combine Manhatatn Interactive and Bridged routers

I'm trying to combine interactive and bridged routers for my project. I created my own Router class, which inherits InteractiveManhattanConnectionRouter, where I overwrite route method, using code from Bridged router. So far no luck, this is my…
Pavel Demidyuk
  • 305
  • 2
  • 11
0
votes
0 answers

How to maintain thumbanil aspectratio in draw2d for a node?

Using draw2d.js, I am creating node with width as 120 and height as 80 and adding thumbnail to the node by setting width as 100 and height as 60. But, after adding nodes to the canvas thumbnails gets distorted as well as when I try to drag a node…
Snehal
  • 1
  • 1
0
votes
2 answers

installation of draw2d latest version on angular 10

how can I install the latest version of draw2d library on angular 10? I used the command "npm i draw2d" but the version that has been installed is 1.0.38 although the latest version is 6.1 I guess. enter image description here thank you.
0
votes
1 answer

Is there any Draw2d.js way to introduce resizing restrictions?

I have a question about Draw2D.js. I have to use ONLY rectangular blocks, so I want the user to only be able to alter the length of the rectangle and prohibit the possibility of modifying its width. In addition, the length should be limited to…
0
votes
1 answer

ArrowDecorator as default drag connection

How to set ArrowDecorator as default connection decorator? When a new instance is created by the "draw2d.policy.connection.ConnectionCreatePolicy", I want it to be decorated by the ArrowDecorator. What is the best way to do this without modifying…
0
votes
1 answer

Update draw2d UI to match Selection

My page has in its center a Draw2D canvas. It may have a selection or not at any moment. I need to update the selection manually. When the user (drags and) drops an element from the Toolbox (panel on the left of the page), it creates the element in…
V. Courtois
  • 315
  • 7
  • 20
0
votes
1 answer

Vuejs2 and draw2d js library

Hello There big community!!! Is there any way to use draw2d touch canvas library in a vuejs2 project with webpack template? If yes, could you provide an implementation example? Thanks a lot in advance for your time and help!!
0
votes
1 answer

Override JavaScript NAME property on Angular2 (typescript)

I'm using draw2d on angular2 (draw2d-wrapper). I'm trying extend a class from them. export class Table extends (draw2d.shape.layout.VerticalLayout as { new(): any }) { static NAME: "Table"; /*Some code*/ } on my code when I do var t = new…
0
votes
2 answers

Restore a label from a JSON

I'm trying to restore a label from a JSON with the draw2d library. With these methods I should to be able to get and set labels but it seems to never call the setPersistentAttributes method : var example = {}; example =…
uroti
  • 147
  • 1
  • 11
0
votes
1 answer

Remove a connection between two nodes

I'm trying to remove an existing connection(DragConnectionCreatePolicy) between two nodes. I tried two ways, the first using this command: this.canvas.remove(connection) but it returns this: EXCEPTION: figure.getCanvas is not a function The second…
uroti
  • 147
  • 1
  • 11
0
votes
1 answer

Draw circles around main circle in JavaScript with draw2d

In my application, I can draw circles with draw2d.js I'd like to know how I can draw circles around a main circle (here is lightblue). I'd like to make it dynamically, because I could have more than 200 circles, so I need to calculate coords…
Vincent Ducroquet
  • 864
  • 4
  • 14
  • 24
0
votes
1 answer

How to make a images border-radius in draw2d-js?

I have this question in draw2d-js, there is a user images and want to make it looks like css3 border-radius. I have used draw2d.shape.basic.Image, but it did not work in style css border-radius. Do any one knows how to make it? Thanks very much for…
gaoyang
  • 1
  • 1
0
votes
1 answer

Draw2d text types not correctly displayed in a ui-bootstrap accordion angularjs app

I am trying to use draw2d javascript library inside an ui-bootstrap-tpls accordion inside an angularjs application. A simple example: (I would build a plunker, but I am unable to include the required libraries. In this example, draw2d-canvas is…
alindber
  • 188
  • 15
0
votes
1 answer

Mean.js - How to inject a 3rd party dependency (draw2d)?

I'm beginning with the MEAN Stack and I'm struggling to do something I'm sure it's pretty basic. I'm trying to inject a new instance of draw2d provided by their downloadable library. I keep having : "ncaught Error: [$injector:modulerr] Failed to…
Alann S.
  • 125
  • 12
0
votes
1 answer

Draw2d.js: Add editable label to existing connections via doubleclick

I want to create a flowchart via Draw2D. All I need is to create some boxes with editable content, connections with editable labels and reading/saving the diagram as a JSON-array. Most of these things are already ready, as you can see here: JS: var…
user3142695
  • 15,844
  • 47
  • 176
  • 332