Hey,

\n

I want to multi select Cells to move them together.\nI know that there is the Method mxGraphComponent.getCells(Rectangle).\nBut then i just got the Cells and i dont moved them. \nI think this could be done via mouseDragged.

\n

Is there Method in jGraph which can select some cells and move them together?

asked 20 May '11, 01:00

ImproSnake's gravatar image

ImproSnake
206
accept rate: 0%


mxGraph.moveCells

link

answered 20 May '11, 07:08

Gaudenz's gravatar image

Gaudenz ♦♦
7.4k15
accept rate: 31%

Hey Guy's i solved the Problem.

\n

You can create an Rectangle via Mouse Methods (mousePressed, mouseReleased etc.).\nAfter this u use the Method mxGraphComponent.getCells(Rectangle) and then you get the Cells which are in the rectangle. Then you use the cells in the rectangle to select them.\nmxGraph.selectCellsForEvent(Object[], MouseEvent)

\n

After this u can move them via mouse drag automatically.

link

answered 20 May '11, 11:46

ImproSnake's gravatar image

ImproSnake
206
accept rate: 0%

Try the Rubberband Handler

\n
rubberBand = new mxRubberband(grphComponent);\n
link

answered 31 Jan, 21:40

Saju%20Chithran's gravatar image

Saju Chithran
707
accept rate: 20%

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:

×364
×65
×30
×25

Asked: 20 May '11, 01:00

Seen: 1,019 times

Last updated: 31 Jan, 21:40

powered by BitNami OSQA