-
Notifications
You must be signed in to change notification settings - Fork 1
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
Shatter tool #142
Shatter tool #142
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two small suggestions here but otherwise looks good!
I think having the cursor properties be in the component makes more sense than in the subscriptions, since modifying CSS is a bit less tricky than the maplibre rendering operations.
Also, if we can add a hover state while using the shatter tool on mouse move that would be ideal!
@@ -91,10 +95,38 @@ export const getRenderSubscriptions = (useMapStore: typeof _useMapStore) => { | |||
{ equalityFn: shallowCompareArray }, | |||
); | |||
|
|||
const _updateMapCursor = useMapStore.subscribe<MapStore["activeTool"]>( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PP: This could also be in the map component and use tailwind cursor-x
properties
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this suggestions but I'm sort of in a hurry so created new issue #145 so we can do this later
@@ -57,6 +58,12 @@ export const handleMapClick = ( | |||
SelectZoneAssignmentFeatures(mapStore); | |||
}); | |||
} | |||
} else if (activeTool === "shatter") { | |||
const documentId = mapStore.mapDocument?.document_id; | |||
const featureId = e.features?.[0].id?.toString(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PP: Highlight on mouse move? Eg. Select features, mapStore.setHoveredFeatures(features[0])
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. @mariogiampieri ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks great
The merge-base changed after approval.
Description
Reviewers
Checklist
Screenshots (if applicable):