Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6077253
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T10:42:01+00:00 2026-05-23T10:42:01+00:00

I created ( http://jsfiddle.net/XMhMR/1/ ) a simple div that you can click and drag.

  • 0

I created (http://jsfiddle.net/XMhMR/1/) a simple div that you can click and drag. Whenever you click and drag, though, the div moves at lightning speed.

I want more of a Google Maps-style click and drag, where it’s not so fast. I tried dividing the deltas by a factor of 10, but it strangely accelerates and decelerates. Anyone know what’s going on?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T10:42:02+00:00Added an answer on May 23, 2026 at 10:42 am

    You should be handling your scroll variables the same way you handle the “current position”. Store them in the object rather than grabbing them each time. You’re basically adding each movement in every time it moves. If you move by 2 px, then another 2, the first time you move by 2, then the 2nd time you move by 2+2. But you’ve already moved by 2 so now you’re moving by 6 instead of 4… this builds to get really fast eventually.

    http://jsfiddle.net/XMhMR/3/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I created a simple demo here that demonstrates the problem: http://jsfiddle.net/boblauer/eCugY/ Basically, I want
I have small application: http://jsfiddle.net/Bwdf6/4/ But with click on delete, tags that created after
Okay, so I'm still learning here. Created a jsfiddle http://jsfiddle.net/JustJill54/GDVt6/ that will toggle visibility
I've created an example of the problem here: http://jsfiddle.net/jXLSW/ Notice that when you hover
I've created a JS Fiddle at http://jsfiddle.net/Vcftv/2/ that illustrates the problem. I have some
http://jsfiddle.net/hL6rT/1/ I've created div with a absolute positioned image inside it the idea is
I've created a fiddle here: http://jsfiddle.net/surfjam/zWWpz/ I can't figure out why animate works in
I created a fiddle http://jsfiddle.net/gifcy/bJJ5s/5/ On DOM ready I hide the image. I could
I have created a fiddle to test this : http://jsfiddle.net/Ninjanoel/X6ShS/ which works fine :(
I've created a fiddle to demonstrate my issue: http://jsfiddle.net/motocomdigital/QyhpX/5/ OVERVIEW I'm creating a tabbed

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.