-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Use view.getRotation or view.getResolution instead of view.getState #3174
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
Conversation
LGTM |
Use view.getRotation or view.getResolution instead of view.getState
|
@elemoine but doesn't the constructor set the rotation to 0 in that case? It seems to me a lot of the current code in ol.View does not handle an undefined rotation anyway?
|
Yes, but look at |
true, but do you agree there is a lot of code in ol.View that doesn't handle the undefined case correctly? Should we not just disallow undefined for rotation? |
I also think that |
And we could do the same for others properties, eg. |
I agree: it would greatly diminish code complexity. |
getState()
returns all the view properties; no need to call it when only one property is used.