Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9225847
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T04:40:54+00:00 2026-06-18T04:40:54+00:00

Is it possible to make jsPlumb Flowchart connectors not to cross connectable items or

  • 0

Is it possible to make jsPlumb Flowchart connectors not to cross connectable items or specified elements (in the example: elements with ‘item’ class)?

Default Flowchart behaviour:

enter image description here

A desired result:

enter image description here

Here’s what I tried:

http://jsfiddle.net/CcfTD/1/

Edited to clarify

HTML

 <div id="root">
        <div class="item" id="item1">Item 1</div>
        <div class="item" id="item2">Item 2</div>
        <div class="item" id="item3">Item 3</div>
        <div class="item" id="item4">Item 4</div>
        <div class="item" id="item5">Item 5</div>
  </div>

JS

   jsPlumb.connect({
    source: $('#item2'),
    target: $('#item7'),
    anchors: [ "Continuous" ],
    connector:[ "Flowchart" ],
    paintStyle: {
        strokeStyle: "#000000", 
        lineWidth:1
    }
});

Basically to have jsPlumb engine (SVG or canvas) be aware of the relevant DOM elements
and have a object-avoidance scheme

http://jsfiddle.net/adardesign/2ZFFc/

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T04:40:55+00:00Added an answer on June 18, 2026 at 4:40 am

    While I am actually trying to find a proper method for doing this (which led me to your question). I do have a solution that I am using in the meanwhile to get jsPlumb to work in the way that I want it to.

    Basically you have to add in a zero height/width div to act as an intermediate node. You then make connections to and from that node instead of directly between the real items.

    I have modified your jsfiddle (updated link) to provide an example of this.

    The important things to note are ability to set the anchor placement using coordinates and the ability to use two different endpoint shapes. In addition, since the default length from the anchor to the first turn is too long in your example, it can be controlled by using the stub argument.

    Below are the relevant modifications with comments.

    HTML

    <div id="root">
        <div class="item" id="item1">Item 1</div>
        <div class="item" id="item2">Item 2</div>
        <div class="item" id="item3">Item 3</div>
        <div class="item" id="item4">Item 4</div>
        <div class="item" id="item5">Item 5</div>
        <div class="item" id="item6">Item 6</div>
        <div class="item" id="item7">Item 7</div>
        <div class="node" id="8-12"></div>            <!-- Midpoint -->
        <div class="item" id="item8">Item 8</div>
        <div class="item" id="item9">Item 9</div>
        <div class="item" id="item10">Item 10</div>
        <div class="item" id="item11">Item 11</div>
        <div class="item" id="item12">Item 12</div>
        <div class="item" id="item13">Item 13</div>
        <div class="item" id="item14">Item 14</div>
    </div>
    

    CSS

    .node {
        position: absolute;
        height: 0px;
        width: 0px;
        visibility: hidden;
    
        /* change these to place the midpoint properly */
        left: 285px;
        top: 160px;
    }
    

    JS

    //connection from item8 to midpoint(8-12)
    jsPlumb.connect({
        source: $('#item8'),
        target: $('#8-12'),
        connector:[ "Flowchart", {stub:5} ], //<== set stub length to be
                                             //    as short as you need it
        paintStyle: {
            strokeStyle: "#000000", 
            lineWidth:1
        },
        anchors:[ [0,0.5,-1,0],[0.5,0,0,-1] ], //<== connection position/direction
        endpoints:[ ["Dot", {radius:2}],["Blank"] ] //<== Blank connector at end
    });
    
    //connection from midpoint(8-12) to item12
    jsPlumb.connect({
        source: $('#8-12'),
        target: $('#item12'),
        connector:[ "Flowchart", {stub:5} ], //<== set stub length to be
                                             //    as short as you need it
        paintStyle: {
            strokeStyle: "#000000", 
            lineWidth:1
        },
        anchors:[ [0,0.5,-1,0],[0.5,0,0,-1] ], //<== connection position/direction
        endpoints:[ ["Blank"],["Dot", {radius:2}] ] //<== Blank connector at start
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How is it possible to make knockout data-bind work on dynamically generated elements? For
Is it possible to make a Func delegate an extension method? For example, just
Possible Duplicate: make drop down list item unselectable I have an asp.net dropdownlist and
its possible to make UIScrollView indicator always show? and not only when scrolling! Thank
Is it possible to make an NSString bold? If so, how? I am not
Is it possible to make the default Eclipse Generate hashCode() and equals() use getters
Is it possible to make sub web components in Dart ? Say, for example,
Possible Duplicate: Make CSS 3.0 the Default in Visual Studio 2010 SP1 Web Update
Is it possible make some handler that will do something when user shutdown computer
Is it possible make an activity, that will lock the android device? That device

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.