I want that in my graph when I drag any vertex, it should be inserted only when it is dropped on another vertex and should throw an error message when it is dropped on the graph outside of any other vertex.


Basically the feature I want is to add objects only inside swimlanes and not anywhere else in the diagram.


Please guide how to achieve this.

asked 25 Mar '12, 21:10

Tushar's gravatar image

accept rate: 0%

This feature is available in mxEditor via the swimlaneRequired switch. It can be implemented via the dropHandler argument in mxUtils.makeDraggable or mxDragSource (see addSidebarIcon in schema.html example). What setup are you using for your sidebar (ie. is it programmatically created or are you using a config file? which example is your app based on?)


answered 26 Mar '12, 00:21

Gaudenz's gravatar image

accept rate: 39%

thanks, I check the schema example and understood how to implement the same. anyways, to answer your question, my app is based on the (old) grapheditor example

(26 Mar '12, 04:55) Tushar
Your answer
toggle preview

Follow this question

By Email:

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



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



Asked: 25 Mar '12, 21:10

Seen: 1,557 times

Last updated: 26 Mar '12, 04:55