FAQ Database Discussion Community


Iterate through endpoints of div in jsPlumb

javascript,jsplumb
I am trying to find a target endpoint of a div in jsPlumb so I can connect it to another div. How do I iterate through the endpoints of a div? Here's what I am trying function getTargetEndpointOfDiv(divId) { var endpoints = $scope.jsPlumbInstance.selectEndpoints(divId) for (var i = 0; i <...

JSon Output jQuery div Containers with Children & Attributes

javascript,json,save,jsplumb
I am currently working with jsPlumb & got stuck at saving & loading the containers. I figured out how to save the endpoints, connections & positions. But I can't figure out, how to save the div containers, including their attributes, children & the children's attrubites. Here's a snippet of the...

JQuery / JsPlumb: toggle “hidden/visible” anchor with checkbox strarting from Hidden

javascript,jquery,checkbox,show-hide,jsplumb
i've wrote something using JsPlumb Library. I got three elements that start using `display:none;` and then i use the typical Jquery code for make them appear flagging a checkbox: input type="checkbox" id="nameCB" name="nameCB" value="on" $('#nameCB').click(function(){ this.checked?$('#elementID').show(1000):$('#elementID').hide(1000); My problem is if i set an anchor for one of these elements: jsPlumb.addEndpoint('elementID',...

JsPlumb - Basic setup advice

jsplumb
I've never used jsplumb before and I have read some of the documentation and looked at the demos, but I still don't understand.. I want to create a DIV like this : One Input and upto 8 outputs (this value may change) How do I do this ? I will...

jsPlumb is not redrawn after view change in angular.js?

javascript,angularjs,jsplumb,ngroute,ng-view
I made a two pages using angularjs ngRoute. On first page I show two connected jsPlumb objects. Second page does not contain an Plumb object. However, when I go from first page to second Plumb objects does not disappear. Do you know how to achieve proper jsPlumb refresh with ng-view...

Finding the jsPlumb connection between two ids

javascript,jquery,html,jsplumb
I am trying to remove the connection between two html elements. I have the ids of both elements, but I do not know how to find the connection in the jsPlumb instance that combines the two. How can I find the connection between two ids?

jsPlumb drop on target Element, not only Endpoint

javascript,jsplumb
i search by Google but don't find anything. I have some source div's and one target div. Now when a User want to create a connection he must click directly on the endpoint from the source and must drop the connection directly on the endpoint from the target. But I...

html2canvas does not print jsPlumb Connectors

svg,jsplumb,html2canvas
How to print SVG elements that are built by jsPlumb. Known that getting all SVG Elements drawen by jsPlumb is retrieved by this code : var uiJsPlumbConnectors=jsPlumb.getAllConnections().map(function(conn){return conn.canvas;}) All connectors are SVG elements : Using html2canvas to print all connectors (SVG), it does not work : html2canvas(uiJsPlumbConnectors).then(function(c){ window.open(c.toDataURL('image/png')) }); An...

Getconnection() not working for state machine

javascript,jquery,state-machines,jsplumb
I am using jsPlumb statemachine. I would like to save and load my chart later. I googled and found that I would have to do it using json Object. I tried few examples stackoverflow. I am able to get the positions of each of the box but I cannot get...

Removing all jsPlumb endpoints from a div

javascript,html,jsplumb
I am trying to remove all jsPlumb endpoints from a div with a source endpoint at right and a target at the left. Here is the code that adds the endpoints to the div: addEndpointsToDiv("exp1", ["Right"], ["Left"]) function addEndpointsToDiv(divId, sourceAnchors, targetAnchors) { for (var i = 0; i < sourceAnchors.length;...

jsPlumb - how to deny connection (detach) if target or source is specify?

jsplumb
I'm new in jsPlumb, I'm plaing with demos. I need not to allow the connection when the target or source is specify. I mean: when the target is X - connection can't be establish.

Auto Connecting with jsPlumb

javascript,jsplumb
Hello StackOverflow community, this is my first post, so please be gentle, since I don't know the etiquette here yet. Anyways, can someone help me auto connect with jsPlumb? I just can't figure out how to do it, using the styles in addEndpoint function. Hope there are some clever people,...

Jsplump dynamically draw state machine diagram

javascript,jquery,html,css,jsplumb
I am using jsplumb to draw dynamic state machine diagram. On click of a button I need to add new box in a drawing area and allow user to position it as per their need. I am not getting any proper easy to understand documentation for this. I tried few...