Skip to content

Conversation

@marcin-jelenski
Copy link
Contributor

@marcin-jelenski marcin-jelenski commented Jan 5, 2022

The current mouse scroll is laggy.
Let's remove debounce method and use float zoom.

Tested on a physical mouse (Logitech) and MacBook touchpad.

ezgif-5-489115cf7e

Also fixed #1079

@JaffaKetchup
Copy link
Member

JaffaKetchup commented Jan 5, 2022

Looking good! Haven't had much experience with this library on the web, but this looks nice from the .gif you added.

Just wondering out loud, could the removal of the debounce cause unintended side effects?

@marcin-jelenski
Copy link
Contributor Author

marcin-jelenski commented Jan 5, 2022

@JaffaKetchup it seems debounce effect was introduced to limit number of zoom changes on scroll. Image loading is limited anyway by TileLayerOptions::updateInterval, so it was rather redundant. Also, the debounce method broke fling, which should work now.

I'm testing both on desktop (Mac) and web (Safari/Chrome/Opera).

@marcin-jelenski
Copy link
Contributor Author

@kengu @johnpryan would you mind taking a look?

Copy link
Member

@JaffaKetchup JaffaKetchup left a comment

Choose a reason for hiding this comment

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

LGTM, as long as this doesn't cause unnecessary processing stress. Just waiting on maintainers to return or people to be given write access. See #1117.

EDIT: Also see my comment below.

Copy link
Member

@JaffaKetchup JaffaKetchup left a comment

Choose a reason for hiding this comment

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

With those changes, LGTM I think.

@marcin-jelenski
Copy link
Contributor Author

Thanks for the heads up @JaffaKetchup.

We've decided to release our app with a fork attached (not to block release). You could test the new scroll behaviour here:
https://app.spacescripting.com/#/map

Fingers crossed for write access and getting this merged. It really improves the experience on desktop and web.

@JaffaKetchup
Copy link
Member

No problem :).

Can't look at the website right now, as I'm on mobile and these changes don't affect the pinch gesture AFAIK.

Hoping for merge too!

@JaffaKetchup
Copy link
Member

JaffaKetchup commented Jan 29, 2022

@marcin-jelenski Please pull upstream when possible, then I (or another maintainer) can merge after running the checks.

@marcin-jelenski
Copy link
Contributor Author

@JaffaKetchup done, updated with upstream.

@JaffaKetchup
Copy link
Member

JaffaKetchup commented Jan 29, 2022

@marcin-jelenski Many thanks :)
Unfortunately, it looks like 'lib/src/gestures/gestures.dart' hasn't been formatted correctly, so the checks have failed. Please run dart format to fix the file, then I'll be ready to merge.
Thanks, and sorry for the hassle!

@marcin-jelenski
Copy link
Contributor Author

@JaffaKetchup done - formatting fixed.

@JaffaKetchup JaffaKetchup merged commit 95c05b5 into fleaflet:master Jan 29, 2022
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.

Unnecessary log on zoom level changed

2 participants