IDraggable: DragSnap#2022
Merged
swharden merged 19 commits intoScottPlot:mainfrom Aug 7, 2022
Agorath:ISnap_#2017
Merged
Conversation
added 3 commits
August 7, 2022 20:13
…mooth, NearestInteger, NearestPosition.
…derived classes. Furthermore modified all relevant usages of these adjusted classes. Added a new cook book recipe for axis lines that shows the usage of the custom position axis snap (NearestPosition).
Agorath
commented
Aug 7, 2022
src/ScottPlot4/ScottPlot.Cookbook/Recipes/Plottable/AxisLineAndSpan.cs
Outdated
Show resolved
Hide resolved
* moves ISnap from Plottables into SnapLogic * uses top-level namespaces * adds XML docs to snap logic classes
Closed
this logic object allows separate 1D snap logic objects to be combined into a 2D snap system
IDraggable now requires a single 2D snap system. It can be replaced with a custom one if desired.
bclehmann
reviewed
Aug 7, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose:
Implemented the new ISnap-interface proposed in #2017.
Added the new ISnap interface as well as the default implementation Smooth, NearestInteger, NearestPosition.
Modified the signature of DragSnapX/Y in IDraggable and adjusted all derived classes.
Furthermore modified all relevant usages of these adjusted classes.
Added a new cookbook recipe for axis lines that shows the usage of the custom position axis snap (NearestPosition).
2022-08-07.20-22-58.mp4
Usage of the default NearestInteger and NearestPosition snap implementations:
Usage of a custom snap implementation: