How to get the x and y co-ordinate values from overlays :

\n

I am trying to do like this \noverlay.addListener(mxEvent.CLICK, mxUtils.bind(this, function(sender,evt,graph,cell)
\n{\nvar x = evt.properties.event.x;\nvar y = evt.properties.event.y;\nvar status = "sts: x="+x+" y="+y;\n}\nbut i am not getting, any help will be appreciated, Thanks in advance...

asked 11 Feb '12, 07:10

hansie's gravatar image

hansie
51428
accept rate: 0%


The properties for mxEvent.CLICK in mxGraph are the native event ("event") and the cell ("cell"). You can get the x- and y-coordinate from the native event (or override mxGraph.click and get the coordinates from the mxMouseEvent instead).

link

answered 13 Feb '12, 00:56

Gaudenz's gravatar image

Gaudenz
80.1k1310
accept rate: 39%

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
×39
×29
×22
×10

Asked: 11 Feb '12, 07:10

Seen: 1,954 times

Last updated: 13 Feb '12, 00:56