In my application, I have custom logic based on which i decide whether a target cell is valid drop target or not. I have overriden the isValidDropTarget method to add the custom logic and return false when I do not want a node to act as a container\nMy app is similar to the GraphEditor example in terms of overall layout. \nNow my problem is that when I drag a cell from the library panel to the main graph panel over another symbol, it always highlights the target cell with the blue outline (even if it is not a valid drop target)

\n

Whereas when I drag and drop a cell to a void space in the graph and then I drag it over a target cell (my overriden method is called) and the target cell is or is not highlighted as per the return value of my method.

\n

I want to understand how I can replicate the same functionality of highlighting (based on the isValidDropTarget method) even in case I am dragging and hovering the cell from the library panel directly over a target cell?

asked 06 Mar '12, 02:37

Tushar's gravatar image

Tushar
36117
accept rate: 0%


mxUtils.makeDraggable returns an mxDragSource. Override mxDragSource.getDropTarget or set mxDragSource.prototype.highlightDropTargets to false.

link

answered 06 Mar '12, 04:39

Gaudenz's gravatar image

Gaudenz
80.1k1310
accept rate: 39%

perfect thanks!

(06 Mar '12, 19:10) Tushar
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:

×228
×13
×11

Asked: 06 Mar '12, 02:37

Seen: 1,654 times

Last updated: 06 Mar '12, 19:10