Franklinjagan / jsplumb

Automatically exported from code.google.com/p/jsplumb
0 stars 0 forks source link

Add a mouse event on a endpoint (and a label, but that did not make it into the 1.3.0 release) #64

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I want to add a label end a mouse event on an endpoint

Can u help me on this
tanx

Original issue reported on code.google.com by Giuseppe.Russo81@gmail.com on 24 Mar 2011 at 12:36

GoogleCodeExporter commented 9 years ago
can you tell me a little more about your requirements here?  for mouse events 
would you be looking at the same sort of thing as Connection - mouseenter, 
mouseexit, click?

for labels, what sort of control over positioning would you need?

Original comment by simon.po...@gmail.com on 27 Mar 2011 at 10:56

GoogleCodeExporter commented 9 years ago
y try to add mouse event on endpoint as u make on connection but dosn't work,
and i don't know how make it work 
for label i want to add a label for every endpoint on every endpoint
Is it possible?
tanx

Original comment by Giuseppe.Russo81@gmail.com on 28 Mar 2011 at 7:27

GoogleCodeExporter commented 9 years ago
another problem is de compatibility of this 2 requirements  on ie6

Original comment by Giuseppe.Russo81@gmail.com on 28 Mar 2011 at 9:02

GoogleCodeExporter commented 9 years ago
there is no support in the api for doing this right now.  that's why it doesn't 
work ;)

i need to know more about your requirements.  please see my earlier comment.

Original comment by simon.po...@gmail.com on 28 Mar 2011 at 10:23

GoogleCodeExporter commented 9 years ago
my requirements are these:
1)add mouse event on endpoint like a click.
2)add a label to every endpoint.
for first requiremets i add to jsPlumb.Endpoints.Dot 
a variable this.testo= params.testo;
and in paint function 
canvas.onmousedown   = function (event) {alert(self.testo)};
this work on firefox, crome ie8 but not in ie6.
For the second requierements i still work.
Can u help me to make the first requirements work on Ie6 and complete the 
second requieremets.

Original comment by Giuseppe.Russo81@gmail.com on 29 Mar 2011 at 7:32

GoogleCodeExporter commented 9 years ago
in any IE other than IE9, jsPlumb uses excanvas for painting.  this does not 
actually use the Canvas element; instead it paints a bunch of VML onto the 
screen.  so it does not surprise me that directly registering mouse listeners 
works in chrome/ff but fails in IE.

for the mouse events i can just add Endpoints to the code that does it for 
Connections right now.  however, this does not currently work in IE, and i have 
no notion of how long it will be until it works in IE.  i intend to get it 
working (if i can) for release 1.2.6 but i do not know when that release will 
happen.

Original comment by simon.po...@gmail.com on 30 Mar 2011 at 2:08

GoogleCodeExporter commented 9 years ago
I have the same problem. I would like to add an event to the endpoint other 
than connecting, say when you double click an endpoint, a pop-up window shows 
up.How can I do this? Is the connecting the only supported event in the current 
version?

Original comment by jigsaw1...@gmail.com on 7 Apr 2011 at 5:39

GoogleCodeExporter commented 9 years ago
I can try this
a variable this.testo= params.testo;
and in paint function 
canvas.onmousedown   = function (event) {alert(self.testo)};
I just want to know if it is officially supported in the current version or 
not. Thanks

Original comment by jigsaw1...@gmail.com on 7 Apr 2011 at 5:47

GoogleCodeExporter commented 9 years ago
I have added this feature in my own application.

Original comment by jigsaw1...@gmail.com on 7 Apr 2011 at 10:23

GoogleCodeExporter commented 9 years ago
it's not in the current jsPlumb version (which is 1.2.5; in fact there are no 
mouse events supported in 1.2.5), or in 1.2.6 development (which does currently 
have support for mouse events on connections).  this enhancement is targeted 
for the 1.2.6 release.

Original comment by simon.po...@gmail.com on 8 Apr 2011 at 1:28

GoogleCodeExporter commented 9 years ago
i've added the code to support mouse events on Endpoints now.  you can register 
listeners for mouseenter, mouseexit, click and dblclick.

as for the label requirement, one question i have is what options would we need 
to support to allow for positioning of the label?    i'm leaning towards an 
[x,y] type thing, where x and y define fractions along each axis, and are bound 
by the range 

0 <= N <= 1

with a default value of [0,0].

any feedback you have would be appreciated.

Original comment by simon.po...@gmail.com on 30 Apr 2011 at 7:29

GoogleCodeExporter commented 9 years ago
moving out to the 1.3.0 release (next release is 1.2.6)

Original comment by simon.po...@gmail.com on 2 Jun 2011 at 4:12

GoogleCodeExporter commented 9 years ago
1.3.0 demo is out.
can we have labels on endpoints in the 1.3.0 and how?

Original comment by post2...@gmail.com on 13 Jul 2011 at 8:26

GoogleCodeExporter commented 9 years ago
nobody ever answered my question about what the API should look like, so i have 
not done anything about Endpoint labels.  i am releasing 1.3.0 either tonight 
or tomorrow and am very unlikely to make any more changes to the code at this 
point.

Original comment by simon.po...@gmail.com on 13 Jul 2011 at 8:30

GoogleCodeExporter commented 9 years ago
1.3.0 was released today.  renaming and marking fixed.  if someone wants the 
label on endpoint stuff i am happy to look at it, but i need some input on the 
API.

Original comment by simon.po...@gmail.com on 16 Jul 2011 at 12:05