fix: Modified the scale factor of clicks#10
Open
jackfruitdog wants to merge 1 commit intoswe-productivity:masterfrom
Open
fix: Modified the scale factor of clicks#10jackfruitdog wants to merge 1 commit intoswe-productivity:masterfrom
jackfruitdog wants to merge 1 commit intoswe-productivity:masterfrom
Conversation
fce5cc1 to
1e8e6f8
Compare
timon-schelling
requested changes
Feb 5, 2026
| self.intersect_path(|| inflated_quad.to_lines(), layer_transform) | ||
| } | ||
|
|
||
| assert!(cache.try_read(rotation2, scale, translation, fp2).is_none()); | ||
| } | ||
| } | ||
|
|
Collaborator
There was a problem hiding this comment.
Make the error messages sligtly more meaningfull.
| /// Does the click target intersect the point (accounting for stroke size) | ||
| pub fn intersect_point(&self, point: DVec2, layer_transform: DAffine2) -> bool { | ||
| let target_bounds = [point - DVec2::splat(self.stroke_width / 2.), point + DVec2::splat(self.stroke_width / 2.)]; | ||
| const MINIMUM_INFLATION: f64 = 5.; |
Collaborator
There was a problem hiding this comment.
should be moved to editor/src/consts.rs
Author
There was a problem hiding this comment.
If I put MINIMUM_INFLATION in editor/src/consts.rs, then I need to add the editor as a dependency for vector-types. When I tried to do this, I got a cyclic dependency error as vector-types are obviously a dependency of the editor. Am I missing something? Also I noticed that other files in vector-types have constants declared in file in the same way.
| let target_bounds = [point - DVec2::splat(self.stroke_width / 2.), point + DVec2::splat(self.stroke_width / 2.)]; | ||
| const MINIMUM_INFLATION: f64 = 5.; | ||
| let base_inflation = self.stroke_width / 2.; | ||
| let target_bounds = match base_inflation < MINIMUM_INFLATION { |
Collaborator
There was a problem hiding this comment.
I would replace this with if
| let translation = DVec2::new(20., 30.); | ||
| let transform = DAffine2::from_scale_angle_translation(scale, rotation, translation); | ||
|
|
||
| let point_one = transform.transform_point2(DVec2::new(100., 50.)); |
Collaborator
There was a problem hiding this comment.
I would prefere point1 etc.
3e0cb51 to
298a6b2
Compare
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.
My apologies. This is the same commit from before, just with tests. I added tests after the fact and ended messing up the commit history. So I had to resubmit.
Closes #8
Used the scale factor of the viewport in order to modify the size of each click.