Closed GoogleCodeExporter closed 8 years ago
do you mean snap the elements you are connecting to a grid? i suppose it would
be nice, yeah. but i have avoided adding layout functionality to jsPlumb so
far: it's not really a core concern of jsPlumb.
this is not the first time someone has asked for layout functionality. i think
i am stil ruling out putting it into the jsPlumb core, but i might be slowly
coming around to the idea of an add-on library. but the code required to do
this doesn't really need to know about jsPlumb at all, except for maybe a
repaintEverything call at the end; this add-on library would effectively a
completely new, standalone, thing.
Original comment by simon.po...@gmail.com
on 13 Nov 2011 at 9:43
i'll be closing this out shortly unless i get some more information.
Original comment by simon.po...@gmail.com
on 17 Nov 2011 at 9:00
Sorry for THE late reply. You are correct. I want to snap THE boxes To a grid.
Can u point me in THE right direction where i can find such à script to add
this functionality.
Thans for THE feedback
Original comment by freeyl...@gmail.com
on 17 Nov 2011 at 9:07
ok. jsPlumb doesnt do layouts as of yet, so if you haven't been able to find
one you might have to do it yourself.
but i don't think it's very much work, surely. would you not just get the
width and height of your container, divide it up a little, and then iterate
through a bunch of elements?
Original comment by simon.po...@gmail.com
on 17 Nov 2011 at 10:00
dont forget, too, that jQuery's draggable stuff lets you constrain elements to
a grid.
Original comment by simon.po...@gmail.com
on 17 Nov 2011 at 10:00
ok closing this. won't be doing it.
Original comment by simon.po...@gmail.com
on 25 Nov 2011 at 3:44
HI,
I found this in the code: clampToGrid
IS this the functionality I was requesting? If yes, how to use it?
THanx
Original comment by freeyl...@gmail.com
on 3 Dec 2012 at 9:55
no this is not the functionality you were requesting, at least i don't think it
is.
i think what you want is to use the grid parameter from jquery draggable.
jsPlumb.draggable($("someSelector"), { grid:[20,20] });
Original comment by simon.po...@gmail.com
on 3 Dec 2012 at 9:58
THanx!!!!
Original comment by freeyl...@gmail.com
on 3 Dec 2012 at 11:03
no problem. incidentally the clampToGrid stuff is an experiment I am working
on, which will work in conjunction with this grid stuff, and clamp the
connector lines to a grid too. it will make for a good effect i think. but
just using the jquery grid stuff for the nodes makes quite a big difference to
flowchart-y type applications.
Original comment by simon.po...@gmail.com
on 3 Dec 2012 at 11:08
Original issue reported on code.google.com by
freeyl...@gmail.com
on 13 Nov 2011 at 9:07