-
Notifications
You must be signed in to change notification settings - Fork 24
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
feat: snap #543
feat: snap #543
Conversation
Deploying with Cloudflare Pages
|
Test this pull request
|
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #543 +/- ##
==========================================
+ Coverage 69.16% 69.58% +0.41%
==========================================
Files 229 235 +6
Lines 7870 8097 +227
Branches 967 1021 +54
==========================================
+ Hits 5443 5634 +191
- Misses 2326 2358 +32
- Partials 101 105 +4
☔ View full report in Codecov by Sentry. |
f341815
to
03a8698
Compare
@@ -25,7 +25,7 @@ module.exports = { | |||
collectCoverageFrom: ["src/**/*.ts"], | |||
verbose: true, | |||
testMatch: ["**/*.spec.(ts)"], | |||
testEnvironment: "node", | |||
testEnvironment: "jsdom", |
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.
thankkkkkkkkkks ❤️
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.
should this svg be react components 🤔 ?
Just to be consistent with the app, no idea just thinking out loud
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.
Sure, we can do that but it would require to configure a loader for svgs so que can import Icon from "./path/to/icon.svg"
and then use it as <Icon />
. I would rather do that as a separate PR.
@@ -0,0 +1,21 @@ | |||
import { useEffect, useRef } from 'react' | |||
|
|||
export const useOutsideClick = (callback: () => void) => { |
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.
yes!
Closes decentraland/sdk#706
snapManager
to control snap distance for position/scale/rotation and enable/disableshift
to toggle snappingsnap.mp4
Hint: hold
shift
to toggle the snapping