dikalo / lienzo-core

Lienzo Structure Graphics GWT Toolkit
Apache License 2.0
51 stars 58 forks source link

Align & distribution - Using a circle path (arc's), it gets broken #183

Closed romartin closed 6 years ago

romartin commented 7 years ago

Once using a circle and adding it for align&distro, it does not works as expected, but no exceptions appear anyway.

danielzhe commented 6 years ago

Looks like this is working. Can you provide more details about how can I simulate this one? By the way, I fixed WiresAlignTests since it was not working anyway.

mdproctor commented 6 years ago

@danielzhe If you are looking for things to work on, you can ping roger and I on the slack channel. Also happy to discuss Lienzo in general: https://lienzo-core.slack.com/

We actually have a diagramming tool we are building on top of all of this, that you may be interested in.

Mark

danielzhe commented 6 years ago

@mdproctor Yes, I am! That's looks pretty interesting. Can you invite me to join that slack channel, since it needs invite to join? My e-mail is djdossantos@live.com.

Thank you!

romartin commented 6 years ago

Hey @danielzhe ! This is Roger. Let me just refer to @SprocketNYC (Dean) for adding you into slack, he should be able to do that. Welcome and thanks in advance for your help! :+1:

danielzhe commented 6 years ago

Thank you, @romartin ! It's been a pleasure to help with Lienzo.

romartin commented 6 years ago

Hey @danielzhe , well this issue is quite old but as far as I remember the issue was when mixing "arc"s and the "align & distribution control".

So the "align & distribution" is a feature that allow sthe user, while dragging, to see the distribution (some dotted-lines appear) on the canvas and so placing the shapes in the "right" locations you know. Also, although not sure if this actually works, the "align & distribution" stuff should work both using Primitive/Shape instances (like rectangles, circles, etc) and WiresShape's.

As far as I remember, when adding shapes like rectangles or paths, which results in no "arc" operations, and then enabling the "align & distribution" mechanism, everything was working, but once doing the same using, for example, a circle or some path which delcaration contains curves, it was not behaving as expected...

Again, not sure if happens again, so if you can please confirm it ,I'll close it... otherwise no worries, will check it again

Thanks a lot!

danielzhe commented 6 years ago

I was not able to make it work with only Primitive/Shape, only encapsulating MultiPath in WiresShape's and then registering it in WiresManager.

The test WiresAlignDistroTests was not working at all using pure Primitives directly on AlignAndDistribute. I'm not sure now if it should works or it used to work and it was changed later.

So I changed the test (there's a PR with that changes) to use WiresShape's (with circle, rectangle, and a 4 point star) and looks like it's working good.

Here is a gif showing the result.

Would be great to talk with you guys to enlighten that kind of details about Lienzo, so I can do more.

Thank you!

romartin commented 6 years ago

great, I see the video working fine too, thanks for the updates @danielzhe !!