Hi,

\n

I'm working on a graph editor for a student project.\nI've based my work on the GraphEditor example from the jgraph 1.8.0.6 lib.

\n

Now I want to set the maximum size of the graph. I've found these methods :

\n

//X Y Width Height\ngraph.setMaximumGraphBounds(new mxRectangle(0, 0, 320, 240));\ngraph.setMinimumGraphSize(new mxRectangle(0, 0, 320, 240));

\n

but I the view is larger than these dimensions. I can not place a vertex outside this area, but I want to make the view port not larger than a fixed resolution in pixel (for e.g. 1024x768), and be able to zoom if needed.

\n

Thank you.\n/Q

asked 20 Mar '12, 00:20

qiou's gravatar image

qiou
12
accept rate: 0%


There is no built-in support for this.

link

answered 20 Mar '12, 00:33

Gaudenz's gravatar image

Gaudenz
80.1k1310
accept rate: 39%

Ok thx for the answer.

\n

Maybe I can try to make a viewport, centered on this area and manually limit the position by checking if the coordinates are in bounds ?

(20 Mar '12, 00:39) qiou
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×10
×9
×2

Asked: 20 Mar '12, 00:20

Seen: 2,019 times

Last updated: 20 Mar '12, 00:39