-
Notifications
You must be signed in to change notification settings - Fork 1k
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
adding positionOffset prop to <Draggable/> #393
Conversation
Whoops.. I just realized that you wanted the new prop to be called |
@STRML bump |
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 stuff overall, just some code style suggestions to make this simpler.
@STRML I've made the changes you requested. Let me know if those check out! |
I was having trouble getting |
What were the errors? |
@STRML hmm it just worked with |
@STRML merge it? |
const translation = getTranslation(controlPos, positionOffset, ''); | ||
return translation; | ||
} | ||
export function getTranslation({x, y}: ControlPosition, positionOffset: PositionOffsetControlPosition, unitSuffix: string): string { |
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.
👍
Lemme know when this gets released! Thanks @STRML |
@STRML will you please release a new version with this in it? Thank you :) |
Published as |
Thanks!!
…On Thu, Apr 18, 2019, 6:25 PM Samuel Reed ***@***.***> wrote:
Published as 3.3.0 @tnrich <https://github.com/tnrich>.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#393 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAU2U4POD57RP2Q3JH7KTA3PRENPRANCNFSM4G4ZIVZA>
.
|
* adding initialPosition prop to <Draggable/> * changing initialPosition to positionOffset * fixing missed rename * Delete pnpm-debug.log * Delete package-lock.json * Delete shrinkwrap.yaml * making requested changes in react-grid-layout/react-draggable#393
* adding initialPosition prop to <Draggable/> * changing initialPosition to positionOffset * fixing missed rename * Delete pnpm-debug.log * Delete package-lock.json * Delete shrinkwrap.yaml * making requested changes in react-grid-layout/react-draggable#393
* adding initialPosition prop to <Draggable/> * changing initialPosition to positionOffset * fixing missed rename * Delete pnpm-debug.log * Delete package-lock.json * Delete shrinkwrap.yaml * making requested changes in react-grid-layout/react-draggable#393
Hey @STRML, here is my first pass at allowing initial position to be a string percent. It is essentially using the same code as before but does not modify the defaultPosition prop in any way and instead adds a new initialPosition prop.
I think this is working as is. We should probably add a few more tests to be sure that the drag callbacks that broke last time aren't breaking this time.
connects #391