Hareeshchandera / jsplumb

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

Connecting nodes with different parent containers miscalculates location #123

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Consider I have 4 HTML divs:

A - Parent div
B - Child of A
C - Child of A
D - Child of C

If I attempt to connect B to D.. the endpoint actually points below the actual 
location of D.

In my scenario B/C are absolutely positioned within A (which has position: 
relative). D has no position: absolute/top/left but this seems to make no 
difference.

Original issue reported on code.google.com by you.dont...@gmail.com on 23 Aug 2011 at 8:30

GoogleCodeExporter commented 8 years ago
this is a known limitation and i won't be doing anything about this.  please 
see the documentation, specifically the section "Where does jsPlumb add 
elements?"

Original comment by simon.po...@gmail.com on 23 Aug 2011 at 8:39

GoogleCodeExporter commented 8 years ago
That doesn't make sense.. for a start if it was a known limitation shouldn't 
jsPlumb through some kind of error than allowing it but with display errors. 
Then also what is the point of the "container"/jsPlumb.Default.Container 
options added in 1.3.2?

I quote the documentation:

"From version 1.3.2, the container concept was reintroduced into jsPlumb, 
because there are use cases in which the default behaviour makes it difficult 
or impossible to build the UI you want...." etc. etc.

Either way this is an unacceptable limitation and if it won't be fixed I will 
have to fork or reimplement.

Original comment by you.dont...@gmail.com on 23 Aug 2011 at 9:00

GoogleCodeExporter commented 8 years ago
the container concept was reintroduced to cater for situations such as the one 
you described.  

do what you will with the code. it's open source. my preference is to not have 
someone berate me about a project i put a lot of work into and give away for 
free.

Original comment by simon.po...@gmail.com on 23 Aug 2011 at 9:06

GoogleCodeExporter commented 8 years ago
"the container concept was reintroduced to cater for situations such as the one 
you described."

Now I'm very confused, are you contradicting your first message?

By the way, we all work and give away projects for free (or at least I do.. 
probably a lot more than you) but that doesn't make us privileged or immune 
from criticism. Don't take things so personally... I use the word 
"unacceptable" to highlight the gravity of the situation to me.

Original comment by you.dont...@gmail.com on 23 Aug 2011 at 9:10

GoogleCodeExporter commented 8 years ago
the gravity of the situation from your perspective is perfectly clear.  as is 
the documentation.  the defaults are good for almost all cases.  then for 
situations like the one you described, you should use the container concept.  
it will work perfectly well for you.  you would identify some element that was 
a common parent, in this case A i guess, and set it using 
jsPlumb.Defaults.Container.  

Original comment by simon.po...@gmail.com on 23 Aug 2011 at 9:15

GoogleCodeExporter commented 8 years ago
I would disagree with you about the documentation being perfectly clear with 
respect to the container concept, I find it a little ambiguous.

Identifying a common parent is exactly what I did do and it gave the 
positioning error as indicated in my initial comment.

At first you say "WontFix" indicating it shouldn't work and in your previous 
comment you have said "it will work perfectly well for me", but as I indicated 
it doesn't.

I'm sorry but I'm finding it very difficult to interpret your communications.

Original comment by you.dont...@gmail.com on 23 Aug 2011 at 9:21

GoogleCodeExporter commented 8 years ago
did you set jsPlumb.Defaults.Container?  i got the impression in the initial 
report that you did not.  this is why i ask for a jsfiddle or test page with 
bug reports.

Original comment by simon.po...@gmail.com on 23 Aug 2011 at 9:32

GoogleCodeExporter commented 8 years ago
I see, I would have expected you to point out the error you perceived I made in 
your first comment rather than set "WontFix" implying my requirements are 
unattainable; hence my confusion.

I did jsPlumb.connect({ source: ..., target: ..., container: ... }). The 
documentation indicates this should work. However it does not work..

I tried setting jsPlumb.Defaults.Container as per your advice in the previous 
bug and this works.

So the true bug is using the "container" option to jsPlumb.connect does not 
work and that only jsPlumb.Defaults.Container works.

Original comment by you.dont...@gmail.com on 23 Aug 2011 at 9:42

GoogleCodeExporter commented 8 years ago
can you please provide a jsfiddle or test page demonstrating the problem, with 
your markup?  thanks.

Original comment by simon.po...@gmail.com on 23 Aug 2011 at 9:47

GoogleCodeExporter commented 8 years ago
I'll create a test case later (this is commercial work so I'm on a tight 
schedule and can't provide you with my source.. [boo]).

Essentially I've just reduced it to the case of jsPlumb.connect({ ..., 
container: ... }) not working.

Original comment by you.dont...@gmail.com on 23 Aug 2011 at 9:55

GoogleCodeExporter commented 8 years ago
i will try this on one of the demos and see if i can replicate.  setting this 
issue back to New.

Original comment by simon.po...@gmail.com on 23 Aug 2011 at 10:00

GoogleCodeExporter commented 8 years ago
can't replicate this.

Original comment by simon.po...@gmail.com on 23 Aug 2011 at 10:07