Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interactive connection line should not snap to grid #7

Open
iwbnwif opened this issue Aug 7, 2016 · 1 comment
Open

Interactive connection line should not snap to grid #7

iwbnwif opened this issue Aug 7, 2016 · 1 comment

Comments

@iwbnwif
Copy link
Owner

iwbnwif commented Aug 7, 2016

However, it probably should snap to connection points?

@iwbnwif
Copy link
Owner Author

iwbnwif commented Aug 18, 2016

Not snapping to the grid is relatively easy to solve.

For example in the modeCREATECONNECTION case of the main m_nWorkingMode switch the line:

m_pNewLineShape->SetUnfinishedPoint(FitPositionToGrid(lpos));

can be changed to:

m_pNewLineShape->SetUnfinishedPoint(lpos);

However, this is only a partial solution. The same problem occurs when dragging line end handles and that is much harder to fix because of which the modeShapeMove case works (ignoring any movement less than a grid step).

If grid snapping is disabled globally for handles, then and a shape is resized, then it is almost impossible to put the shape properly back onto the grid afterwards - because all steps will be grid step size which continue to be off grid.

What is really needed is a more advance snapping mechanism which also allows snapping to connection points or shape centres.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant