Merge pull request #678 from tschaub/once

Rename onOnce to once
This commit is contained in:
Tim Schaub
2013-04-30 15:10:47 -07:00
3 changed files with 3 additions and 3 deletions

View File

@@ -29,7 +29,7 @@ var geolocation = new ol.Geolocation({
tracking: true
});
geolocation.bindTo('projection', view);
geolocation.onOnce('position_changed', function() {
geolocation.once('position_changed', function() {
view.setCenter(geolocation.getPosition());
view.setResolution(2.388657133911758);
});

View File

@@ -3,7 +3,7 @@
@exportProperty ol.Object.prototype.get
@exportProperty ol.Object.prototype.notify
@exportProperty ol.Object.prototype.on
@exportProperty ol.Object.prototype.onOnce
@exportProperty ol.Object.prototype.once
@exportProperty ol.Object.prototype.set
@exportProperty ol.Object.prototype.setOptions
@exportProperty ol.Object.prototype.setValues

View File

@@ -242,7 +242,7 @@ ol.Object.prototype.on = function(type, listener, opt_scope) {
* the listener.
* @return {?number} Unique key for the listener.
*/
ol.Object.prototype.onOnce = function(type, listener, opt_scope) {
ol.Object.prototype.once = function(type, listener, opt_scope) {
return goog.events.listenOnce(this, type, listener, false, opt_scope);
};