Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Event coordinates in Cytoscape.js
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Aleksi Kallio  
View profile  
 More options Oct 30 2012, 4:02 am
From: Aleksi Kallio <kallio.aleks...@gmail.com>
Date: Tue, 30 Oct 2012 01:02:41 -0700 (PDT)
Local: Tues, Oct 30 2012 4:02 am
Subject: Event coordinates in Cytoscape.js

Hi all,

I'm trying to add custom tooltips to Cytoscape.js with qTip2. I found an
example in
http://stackoverflow.com/questions/11307914/fetching-svg-element-from... but
in there mouse coordinates are fetched with  oEvent.clientX and oEvent.clientY.
I tried this but the coordinates are undefined.

Is there a way in cytoscape.js to get event coordinates?

Thanks,
Aleksi


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Yue Dong  
View profile  
 More options Nov 1 2012, 6:24 pm
From: Yue Dong <ory...@gmail.com>
Date: Thu, 1 Nov 2012 15:24:48 -0700 (PDT)
Local: Thurs, Nov 1 2012 6:24 pm
Subject: Re: Event coordinates in Cytoscape.js

(Here is my response, re-posted here in the mailing list)

Hi Aleksi,

cy.nodes().bind("mouseover", function(e){console.log(e)})

showed the event fields are not completely implemented.

Is there a timeframe you would like this implemented by? I can  
probably complete this in 1-2 days, depending on need.

It looks like things would be easy if we gave you access the  
w3c-standard MouseEvent object that caused the event. Would you prefer  
this? What works best for you?

Thanks,
Yue


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Max Franz  
View profile  
 More options Nov 2 2012, 11:48 am
From: Max Franz <maxkfr...@gmail.com>
Date: Fri, 2 Nov 2012 11:48:50 -0400
Local: Fri, Nov 2 2012 11:48 am
Subject: Re: [Cytoscape-discuss] Event coordinates in Cytoscape.js

Cytoscape.js uses the jQuery event model: It creates an event object, referencing the original event.  If an event is triggered -- say in the renderer -- without passing the original event, then there isn't much information in the event you get in your callback.

You don't really need event information for what you're doing anyway.  Inside the handler callback, the reference to `this` is the element that triggered the event.  You can do `this.renderedPosition()`, `this.width()`, and so on.  This will give you enough information to position the qtip.

I will be creating a Cytoscape.js extension that let's you use qtips directly.  So if you can wait a couple of weeks, that may be the better option for you.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Aleksi Kallio  
View profile  
 More options Nov 5 2012, 1:30 am
From: Aleksi Kallio <kallio.aleks...@gmail.com>
Date: Sun, 4 Nov 2012 22:30:10 -0800 (PST)
Local: Mon, Nov 5 2012 1:30 am
Subject: Re: [Cytoscape-discuss] Event coordinates in Cytoscape.js

Thanks Max,

this.renderedPosition() worked.

perjantai, 2. marraskuuta 2012 17.48.51 UTC+2 Max Franz kirjoitti:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Yue Dong  
View profile  
 More options Nov 28 2012, 2:10 pm
From: Yue Dong <ory...@gmail.com>
Date: Wed, 28 Nov 2012 11:10:54 -0800 (PST)
Local: Wed, Nov 28 2012 2:10 pm
Subject: Re: [Cytoscape-discuss] Event coordinates in Cytoscape.js

Hi,

I'm not sure if you still need it, but it has been fixed. I've commited
some changes, and a recent bugfix should also appear on the public
docu/demo page http://cytoscape.github.com/cytoscape.js/.

You can verify by opening the console (such as on the docu page) and typing:

cy.nodes().bind("mousemove", function(e){console.log(e)})

The event object now has the originalEvent field, which contains the
MouseEvent object (or TouchEvent for touch).


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »