AbimannanMuthusamy / jsplumb

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

Initial rendering placement #17

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I'm using the 2.2 version for jQuery and when an draggable endpoint is rendered 
his position on the page is not correct. The weird part is that the item is 
correctly repositionned after dragging it.
Here is a screenshot which will be much more explicit.
http://img806.imageshack.us/img806/3164/renderissue.jpg

I guess it's css related but i don't know how to fix that, suggestions are 
welcome.
Thanks.

Original issue reported on code.google.com by artusama...@gmail.com on 11 Aug 2010 at 11:02

GoogleCodeExporter commented 9 years ago
I understand what my problem is coming from, in the context of my utilization 
of the library i've got a module which is adding a div in the dom through 
javascript and this div has the height of the gap noticed on the screenshot.
The question is do you have a function to call to reposition items when my DOM 
item is loaded?

Original comment by artusama...@gmail.com on 11 Aug 2010 at 12:52

GoogleCodeExporter commented 9 years ago
have you tried jsPlumb.repaintEverything()  ?

Original comment by simon.po...@gmail.com on 12 Aug 2010 at 11:32

GoogleCodeExporter commented 9 years ago
Yeah it doesn't change anything. :/

Original comment by artusama...@gmail.com on 13 Aug 2010 at 8:39

GoogleCodeExporter commented 9 years ago
ah.  well, that is the method that attempts to do what you need, so to debug 
this it'd be great to get a test page from you.  would that be possible?

Original comment by simon.po...@gmail.com on 13 Aug 2010 at 11:37

GoogleCodeExporter commented 9 years ago
I've got this for you, go to http://91.121.95.57/plumbing/?q=node/2/take (you 
must be logged in username is admin, password is admin) you'll see directly 
what goes wrong. ;) The js i wrote is in the file matchingplumb.js.
Hope it helps.

Original comment by artusama...@gmail.com on 16 Aug 2010 at 8:49

GoogleCodeExporter commented 9 years ago
cool, thanks - but you're not gonna like my answer ;)  i opened up the JS 
console once the page was loaded and did jsPlumb.repaintEverything(), and the 
endpoints move down to the right place.  are you sure you executed this call 
after the new div was inserted?

Original comment by simon.po...@gmail.com on 16 Aug 2010 at 9:16

GoogleCodeExporter commented 9 years ago
Hum that's weird... i guess i'm repainting to early. Don't really have any idea 
how to do it later according to the fact that i'm working in a document.ready() 
callback :/

I guess it's fixed ;)

Original comment by artusama...@gmail.com on 16 Aug 2010 at 9:31

GoogleCodeExporter commented 9 years ago
i guess you just need to make sure it happens after the div gets attached?  

i'm not gonna mark this fixed until it's working for you.  there might be 
something up, some timing thing or whatever. let's see.

Original comment by simon.po...@gmail.com on 16 Aug 2010 at 9:37

GoogleCodeExporter commented 9 years ago
any updates on this?

Original comment by simon.po...@gmail.com on 5 Sep 2010 at 6:24

GoogleCodeExporter commented 9 years ago
Not yet no, didn't had that much time to have a look at this, i'll do it next 
week.

Original comment by artusama...@gmail.com on 5 Sep 2010 at 9:40

GoogleCodeExporter commented 9 years ago
It don't seems to be possible to bind a load event on a none created DOM node 
so i had to use a setinterval(). It works.
Thanks, we can close the ticket. ;)

Original comment by artusama...@gmail.com on 6 Sep 2010 at 1:32

GoogleCodeExporter commented 9 years ago
thanks for the update. closing.

Original comment by simon.po...@gmail.com on 17 Sep 2010 at 3:55