Skip to content

Conversation

STRML
Copy link
Collaborator

@STRML STRML commented Jul 19, 2016

Use the ownerDocument and window of the DOM element being manipulated
rather than the global window and document objects. This makes
react-draggable work with a tool like
https://github.com/ryanseddon/react-frame-component

This replaces #177 which still needs some tests.

Use the ownerDocument and window of the DOM element being manipulated
rather than the global window and document objects. This makes
react-draggable work with a tool like
https://github.com/ryanseddon/react-frame-component
@STRML STRML merged commit 0cddb23 into master Jul 19, 2016
@@ -17,15 +17,17 @@ export function getBoundPosition(draggable: Draggable, x: number, y: number): [n
const node = ReactDOM.findDOMNode(draggable);

if (typeof bounds === 'string') {
const {currentDocument} = node;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

currentDocument is a thing? Didn’t know about that one.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, it's actually not. Gap in our test coverage to be sure

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@acusti
Copy link
Contributor

acusti commented Jul 19, 2016

Beautiful! This is exciting.

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

Successfully merging this pull request may close these issues.

2 participants