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

Rename ol.Observable#dispatchChangeEvent() to #changed() #2684

Merged
merged 1 commit into from Sep 11, 2014

Conversation

ahocevar
Copy link
Member

@ahocevar ahocevar commented Sep 5, 2014

Since dispatchChangeEvent does not only dispatch a change event, but
also increases the revision counter, the method name should reflect
this.

Since dispatchChangeEvent does not only dispatch a change event, but
also increases the revision counter, the method name should reflect
this.
ahocevar added a commit to ahocevar/openlayers that referenced this pull request Sep 5, 2014
ahocevar added a commit to ahocevar/openlayers that referenced this pull request Sep 5, 2014
@elemoine
Copy link
Member

elemoine commented Sep 5, 2014

I honestly don't think this change buys us much. How about adding a render method to layers? In the case of vector layers that method would just call dispatchChangeEvent? Although a render method does not make sense on sources, it may make sense on layers.

@bartvde
Copy link
Member

bartvde commented Sep 5, 2014

@elemoine this is also something that came to my mind last night, although I was thinking to name it redraw just like in OpenLayers 2. But render is more inline with what ol3 already has.

@ahocevar
Copy link
Member Author

ahocevar commented Sep 5, 2014

Having a redraw method on layers could raise expectations that this method does not fulfill, e.g. make the source re-fetch data. But a render method on vector layers makes sense to me.

@ahocevar
Copy link
Member Author

Does anyone else have an opinion on this? @bartvde, the re-render use case aside, what do you think? You were the one who suggested a name change in the first place.

@elemoine
Copy link
Member

As I said already I don't think this change buys us too much. I know dispatchChangeEvent does more than dispatching a change event, but I don't think changed makes things more explicit. That being said I'm not opposed to the change. Please merge if you think this is a better name for that function.

ahocevar added a commit that referenced this pull request Sep 11, 2014
Rename ol.Observable#dispatchChangeEvent() to #changed()
@ahocevar ahocevar merged commit b431487 into openlayers:master Sep 11, 2014
@ahocevar ahocevar deleted the notify-change branch September 11, 2014 22:51
adube pushed a commit to adube/ol3 that referenced this pull request Sep 26, 2014
oterral pushed a commit to geoadmin/ol3 that referenced this pull request Nov 6, 2014
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.

None yet

3 participants