Add options to ol.DeviceOrientation constructor
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
/**
|
||||||
|
* @typedef {Object} ol.DeviceOrientationOptions
|
||||||
|
* @property {boolean|undefined} tracking Tracking.
|
||||||
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {Object} ol.GeolocationOptions
|
* @typedef {Object} ol.GeolocationOptions
|
||||||
* @property {boolean|undefined} tracking Tracking.
|
* @property {boolean|undefined} tracking Tracking.
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
@exportSymbol ol.DeviceOrientation
|
@exportClass ol.DeviceOrientation ol.DeviceOrientationOptions
|
||||||
|
|||||||
@@ -22,10 +22,9 @@ ol.DeviceOrientationProperty = {
|
|||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends {ol.Object}
|
* @extends {ol.Object}
|
||||||
|
* @param {ol.DeviceOrientationOptions=} opt_options Options.
|
||||||
*/
|
*/
|
||||||
ol.DeviceOrientation = function() {
|
ol.DeviceOrientation = function(opt_options) {
|
||||||
|
|
||||||
goog.base(this);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
@@ -33,11 +32,12 @@ ol.DeviceOrientation = function() {
|
|||||||
*/
|
*/
|
||||||
this.listenerKey_ = null;
|
this.listenerKey_ = null;
|
||||||
|
|
||||||
this.setTracking(false);
|
|
||||||
|
|
||||||
goog.events.listen(this,
|
goog.events.listen(this,
|
||||||
ol.Object.getChangedEventType(ol.DeviceOrientationProperty.TRACKING),
|
ol.Object.getChangedEventType(ol.DeviceOrientationProperty.TRACKING),
|
||||||
this.handleTrackingChanged_, false, this);
|
this.handleTrackingChanged_, false, this);
|
||||||
|
|
||||||
|
goog.base(this, goog.isDef(opt_options) ? opt_options : {});
|
||||||
|
|
||||||
};
|
};
|
||||||
goog.inherits(ol.DeviceOrientation, ol.Object);
|
goog.inherits(ol.DeviceOrientation, ol.Object);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user