Closed xiaodaigh closed 4 years ago
Could you describe more about the issue? as it seems you are troubled with the styling? right?
I just ran the above code in a simple server, then I just drag Drag me 1 and try to connect Drag me 2 onto it then this appears.
Give up on this library, its poorly documented, plenty of bugs and not maintained at all.
To fix your issue however, you need to make the canvas div have 'position: absolute' in css and it'll work as expected
Here's a jsfiddle of your code with this fix showing it working https://jsfiddle.net/6309udza/
Thanks @shmcgough
@xiaodaigh I just updated the library to account for different kinds of positioning with margins, so your original code should work now. I also took the opportunity to optimize it in some fronts.
@shmcgough Apologizes it is seen that way, I have been working on a new big release (check milestone) by completely redoing the library from zero, and while the code is much cleaner and way shorter, I've been having issues with certain functions (mainly to do with the rearrangeMe function in the current library, which automatically centers the children with respect to the parents, it is currently very cluttered and messy) which I can't quite simplify and make it work with new functionality (programmatically creating flowcharts, deleting single blocks, etc.).
Because of that I had planned to stop adding into the current version, but it's all just taking longer than I thought. I do want to make sure there are no bugs though so I will be trying to fix these ASAP.
Here's my html