Make Translate options optional
This commit is contained in:
@@ -15,10 +15,10 @@ goog.require('ol.interaction.Pointer');
|
|||||||
* @constructor
|
* @constructor
|
||||||
* @extends {ol.interaction.Pointer}
|
* @extends {ol.interaction.Pointer}
|
||||||
* @fires ol.interaction.Translate.Event
|
* @fires ol.interaction.Translate.Event
|
||||||
* @param {olx.interaction.TranslateOptions} options Options.
|
* @param {olx.interaction.TranslateOptions=} opt_options Options.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
ol.interaction.Translate = function(options) {
|
ol.interaction.Translate = function(opt_options) {
|
||||||
ol.interaction.Pointer.call(this, {
|
ol.interaction.Pointer.call(this, {
|
||||||
handleDownEvent: ol.interaction.Translate.handleDownEvent_,
|
handleDownEvent: ol.interaction.Translate.handleDownEvent_,
|
||||||
handleDragEvent: ol.interaction.Translate.handleDragEvent_,
|
handleDragEvent: ol.interaction.Translate.handleDragEvent_,
|
||||||
@@ -26,6 +26,7 @@ ol.interaction.Translate = function(options) {
|
|||||||
handleUpEvent: ol.interaction.Translate.handleUpEvent_
|
handleUpEvent: ol.interaction.Translate.handleUpEvent_
|
||||||
});
|
});
|
||||||
|
|
||||||
|
var options = opt_options ? opt_options : {};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @type {string|undefined}
|
* @type {string|undefined}
|
||||||
|
|||||||
Reference in New Issue
Block a user