Note that there are some explanatory texts on larger screens.

plurals
  1. POjsPlumb not working after loading jQuery EasyUI (conflict between jQueryUI and EasyUI)
    primarykey
    data
    text
    <p>I come to a real problem with jsPlumb and jQuery EasyUI. </p> <p>Here what happens. I've got a website which is using EasyUI, I was trying to add some jsPlumb connections to it and this connections are not behaving as I want them to do. </p> <p>I prepare some demo with jsPlumb only and it's working. But when I add it to existing site connections are not working. </p> <p>After investigating where is the conflict I came to this: </p> <p>jsPlumb is working as long as I don't load EasyUI. After loading EasyUI:</p> <pre><code> &lt;script type="text/javascript" src="jquery.easyui.min.js"&gt;&lt;/script&gt; </code></pre> <ul> <li>I cannot create new connections by dragging source Endpoint (I drag endpoint but now new connection is created)</li> <li>Endpoints don't follow div they belong to (they position themselves right when you point them by mouse)</li> </ul> <p>I prepare 2 demos using jsFiddle to show what I mean. The ONLY think that differs this two samles is external resource of jquery.easyui</p> <ul> <li>Working jsPlumb <a href="http://jsfiddle.net/matbochynski/t39jz/embedded/result/" rel="nofollow">Full Screen Result</a></li> <li>Not Working: <a href="http://jsfiddle.net/matbochynski/6BTCJ/2/embedded/result/" rel="nofollow">Full Screen Result</a></li> </ul> <p>How I can solve this? Maybe some of You know where is conflict. My site is to advaced to change EasyUI to anything else at this point, and I really want to use jsPlumb as I cannot find any as powerful toolkit as this. </p> <hr> <p>EDIT:</p> <p>As was suggested I've tried to override draggable and it partially works but not as I want it to. </p> <pre><code>(function($){ var __old_draggable = $.fn.draggable; $.fn.draggable = function(){ if(this.hasClass('_jsPlumb_endpoint') || this.hasClass('window')){ return; } return __old_draggable.apply(this, arguments); }; $.extend($.fn.draggable,__old_draggable); })(jQuery); </code></pre> <p>Partially because: </p> <ul> <li>Endpoints are no longer draggable - that's good, </li> <li>But they do NOT create new connection, that's bad. </li> <li>They do NOT follow window they are attached to. </li> </ul> <p>Furthermore now I now, that EasyUI override jQuery draggable and this cause this strange (for me) behaviour. Sadly, I have problems with force draggable method to be original jQuery method... So I'm looking forward to other solutions for my problem</p> <hr> <p>Edit: I delete everything connected with draggable and dropable override in EasyUI and its working. Now the problem is how to do this in program not in easyui script, as somebody will update to new version and everything will stop working... </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload