Skip to content

Request for enhancement, initial position. #52

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

Closed
GirlBossRush opened this issue May 4, 2015 · 2 comments
Closed

Request for enhancement, initial position. #52

GirlBossRush opened this issue May 4, 2015 · 2 comments

Comments

@GirlBossRush
Copy link

I'm able to set the initial Draggable child component's position using a style absolute positioning. The Draggable component will then make translate transforms based off this initial position. The issue with this approach is that I'm unable to store the updated position directly.

Would it be possible to add a start prop to the Draggable component to set the initial position? I've attempted to set the child transform style on first render, but the Draggable component is not aware of this.

Here's a link to how I'm currently fleshing out a window system using your component.
https://github.com/nirrius/nirrius/blob/master/app/common/pane/index.jsx#L55-L69
http://nirri.us/~teffen

Thank you.

@GirlBossRush GirlBossRush changed the title Request for enhancement, default position. Request for enhancement, initial position. May 4, 2015
@STRML
Copy link
Collaborator

STRML commented May 5, 2015

This is a problem with the callbacks, no? The ui.position property reflects relative position, not absolute. You can simply add the initial absolute position to the relative position and you should get what you want.

@STRML
Copy link
Collaborator

STRML commented May 8, 2015

I'm actually going to need something like this for react-grid-layout, so expect this soon.

@STRML STRML closed this as completed in e8fc9e5 May 8, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants