google-code-export / jsplumb

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

StateMachine connectors have far too much padding. #309

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
An example of this problem is available on the jsPlumb website itself.
http://jsplumb.org/jquery/stateMachineDemo.html

Basically, when a StateMachine connector is created and the element it's 
attached to is to the right or bottom of the page (give or take 100 pixels) the 
scrollbar for the page will appear.

Original issue reported on code.google.com by dan.whit...@sabisu.co on 9 Jan 2013 at 9:16

GoogleCodeExporter commented 9 years ago
what browser?

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

GoogleCodeExporter commented 9 years ago
Any browser, tested specifically in Chrome v22, v23, v24 and IE9.

Original comment by dan.whit...@sabisu.co on 9 Jan 2013 at 9:27

GoogleCodeExporter commented 9 years ago
i doubt that i'm gonna do anything about this.

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

GoogleCodeExporter commented 9 years ago
Looked through the code and found the problem and a fix.
It's in the jsPlumb.Connectors.StateMachine.compute function.

The fix: Use curviness (at least for me, may need another check for endpoint 
size) instead of an arbitrary guess of 3* the differences.

Attached the overwritten version of the code that seems to work for me.
May be a starting point if you want to look further into this issue.

Original comment by dan.whit...@sabisu.co on 9 Jan 2013 at 10:57

Attachments:

GoogleCodeExporter commented 9 years ago
i'm gonna fold this one into issue 314, which is a related issue involving the 
flowchart connectors: both issues point to the fact that there should be some 
generic functionality that handles the derivation of the optimum size for the 
container for some connector.  so i'm marking this a duplicate, although it's 
not an exact duplicate of course.

Original comment by simon.po...@gmail.com on 11 Feb 2013 at 12:00