Hareeshchandera / jsplumb

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

Question:about click event #177

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
If you are reporting a defect please supply something that demonstrates the
problem.  In order of convenience, you might like to consider:

- a jsFiddle.  definitely my preferred option.
- a link to a site (preferably not using the minified jsplumb)
- a test page.  if it has dependencies, a zip would be appreciated.

Original issue reported on code.google.com by chaoy...@gmail.com on 16 Jan 2012 at 6:47

GoogleCodeExporter commented 8 years ago
sorry for the previous content, i posted it in mistake.

My question is :
Question 1:  “dblclick” event does not take effect when “click” event 
is bind
Question 2:  due to issue 166 , i use contextmenu in this way:
jsPlumb.bind("jsPlumbConnection", function(e) {  
$("div._jsPlumb_connector svg, 
shape._jsPlumb_connector").contextMenu('menuLine',
                {
                    bindings:
                    {
                        'line1': function (t) {
                            alert('Trigger was ' + t.id + ' Action was Open'+e.connection.id);
                        }
                 }
                }, function (re) { });  
                });
 i use Jquery UI contextmenu on the connection. and that works fine.
however, i meet a problem, i can not singly find the "e.connection" object, it 
always find all the connections mached the JQuery search condition. And when i 
use $("#"+e.connection.id) , the object length returns 0.
so ,is there any way i can find the single connection by "jsPlumbConnection" 
method? 

Original comment by chaoy...@gmail.com on 16 Jan 2012 at 6:58

GoogleCodeExporter commented 8 years ago
i think i might need to see a test page for these questions. 

Original comment by simon.po...@gmail.com on 16 Jan 2012 at 8:40

GoogleCodeExporter commented 8 years ago
i create the test page here: http://jsfiddle.net/que0080/yeT3Z/11/
At the section "//todo here , to bind the contextmenu to this connection",
 i want to bind the context menu to this connection. then i use code  "e.connection.contextMenu(....)" , failed.
because i use the 
http://www.trendskitchens.co.nz/jquery/contextmenu/jquery.contextmenu.r2.js 
contextmenu control for jq, and   $("._jsPlumb_connector ").contextMenu(...) is 
successed to show the contextmenu , however all the connections will be rebind 
by the latest one, so  how can i resolve this problem?

Original comment by chaoy...@gmail.com on 17 Jan 2012 at 1:59

GoogleCodeExporter commented 8 years ago
Connection does not have a "contextMenu" method.  what is that method? 
something added by that plugin?  i suppose it's meant to be added to all DOM 
elements?

Original comment by simon.po...@gmail.com on 19 Jan 2012 at 7:20

GoogleCodeExporter commented 8 years ago
if you follow up on this question please post it to the discussion group i just 
created:

http://groups.google.com/group/jsplumb

Original comment by simon.po...@gmail.com on 19 Jan 2012 at 7:34