LambrechtsWouter / jsplumb

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

StateMachine loopback connections dont have "circle" #304

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hi there,

I have this problem for a while now. Ever since i started using jsPlumb when I 
use a StateMachine loopback connections  no canvas circle is drawn. This 
doesn't allow me to move that connection.

I see in the site demo that the circle in loopback is supported so i dont know 
what might cause mine not to get drawn. The endpoint div gets rendered.

I have the following properties:

{
        anchor : "Continuous",
        connector : [ "StateMachine", {
            curviness : 20,
            proximityLimit : 80,
            loopbackRadius : 30
        } ],
        connectorStyle : {
            strokeStyle : "#4583F5",
            lineWidth : 1
        },
        maxConnections : -1,
        deleteEndpointsOnDetach : true
}

I also have these:

jsPlumb.importDefaults({
            // default drag options
            DragOptions : {
                cursor : 'pointer',
                zIndex : 2000
            },
            // default to blue at one end and green at the other
            EndpointStyles : [ {
                fillStyle : this.endpointColor
            }, {
                fillStyle : this.endpointColor
            } ],
            EndpointHoverStyles : [ {
                fillStyle : this.endpointColor
            }, {
                fillStyle : this.activeStrokeStyle
            } ],
            Endpoints : [ [ "Blank" ], [ "Dot", {radius: 8} ] ],
            ConnectionOverlays : [ [ "Arrow", {
                location : 1,
                width : 10,
                length : 10,
                foldback : 1
            } ], 
            [ "Label", {
                location : 0.7,
                label : "Label",
                cssClass : this.labelClass
            } ] 
            ]
        });

Original issue reported on code.google.com by mfc...@gmail.com on 20 Dec 2012 at 7:37

GoogleCodeExporter commented 8 years ago
can you please provide a link to either a demo page or something on jsfiddle. i 
can't debug this without looking at some code.

Original comment by simon.po...@gmail.com on 20 Dec 2012 at 8:01

GoogleCodeExporter commented 8 years ago
Yeah thats always my problem =). This has grown so complex that i can't really 
provide a simple demo. Ill try to exctract some example.

In the mean time can you point me to the part of the code that draws the 
circle? Maybe i can debug it locally.

Original comment by mfc...@gmail.com on 20 Dec 2012 at 8:04

GoogleCodeExporter commented 8 years ago
each connector type is painted by a renderer, of which there is one for each of 
canvas, svg and vml.  so, look for a line like this in the code:

jsPlumb.Connectors.svg.StateMachine

that's line 8569 in this file

https://github.com/sporritt/jsPlumb/blob/master/build/1.3.16/js/jquery.jsPlumb-1
.3.16-all.js

Original comment by simon.po...@gmail.com on 20 Dec 2012 at 8:12

GoogleCodeExporter commented 8 years ago
closing this. the code has changed - will have changed - when 1.4.0 comes out.  
if it;s still an issue feel free to reopen.

Original comment by simon.po...@gmail.com on 9 Jan 2013 at 9:28