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

Constrain resolution when fit called without duration #11561

Merged
merged 2 commits into from Sep 16, 2020

Conversation

M393
Copy link
Contributor

@M393 M393 commented Sep 15, 2020

Fixes #11560

@jahow
Copy link
Contributor

jahow commented Sep 15, 2020

Thanks a lot for proposing a fix. The changes makes sense to me. Do you think you can add a test that is failing without the fix, and passing with it?

@M393 M393 force-pushed the view-constrain-center-after-fit branch from 02536f8 to 629501e Compare September 15, 2020 15:48
@M393 M393 force-pushed the view-constrain-center-after-fit branch from 629501e to fbcf0b5 Compare September 15, 2020 15:52
@M393
Copy link
Contributor Author

M393 commented Sep 15, 2020

Some of the other View tests use a size of [200, 200], but here:

openlayers/src/ol/View.js

Lines 1714 to 1716 in 2de80e0

getConstrainedResolution(targetResolution, opt_direction) {
const direction = opt_direction || 0;
const size = this.getViewportSize_(this.getRotation());

the default size ([100, 100]) is used regardless.
I have not investigated if this is a problem, just found it a bit strange.

Copy link
Contributor

@jahow jahow left a comment

Choose a reason for hiding this comment

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

Perfect, thanks a lot.

@jahow jahow merged commit 7c5b118 into openlayers:main Sep 16, 2020
@M393 M393 deleted the view-constrain-center-after-fit branch September 16, 2020 15:52
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.

View constraint not resolved after call to fit
2 participants