Skip to content
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

Fix Drag when no offsetParent #1279

Merged
merged 2 commits into from
Aug 15, 2014
Merged

Conversation

SergioCrisostomo
Copy link
Member

Upgraded my largest project to current code (1.5.1-dev) and found a issue I created with the last commit.
While fixing this found also a better logic in the code to be more localized in the Class.

  • Fix Drag when no offsetParent
  • default to false the new "compensateScroll" option
  • add it in the docs

Fixed jsFiddle - drag follows with scroll
Broken jsFiddle - drag do not follow with scroll

- Fix Drag when no offsetParent
- default to false the new "compensateScroll" option
- add it in the docs
@SergioCrisostomo SergioCrisostomo added this to the 1.5.1 milestone Aug 9, 2014
@arian
Copy link
Member

arian commented Aug 10, 2014

What's the issue?

@@ -82,6 +86,7 @@ var Drag = new Class({
drag: this.drag.bind(this),
stop: this.stop.bind(this),
cancel: this.cancel.bind(this),
sumValues: this.sumValues.bind(this),
Copy link
Member

Choose a reason for hiding this comment

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

You don't use this as far as I can see...

@arian
Copy link
Member

arian commented Aug 10, 2014

Looks quite ok I think.

@SergioCrisostomo
Copy link
Member Author

Thank you for feedback @arian. Will check your comments and fix. The issue is that while "onDrag" if scroll happens the dragged element gets out of screen. This is a option to make it stay where the mouse is.

@SergioCrisostomo
Copy link
Member Author

@arian updated.

anutron added a commit that referenced this pull request Aug 15, 2014
@anutron anutron merged commit b2a1efa into mootools:master Aug 15, 2014
@anutron
Copy link
Member

anutron commented Aug 15, 2014

💥 goes the dynamite.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants