Make Translate options optional

This commit is contained in:
Thomas Chandelle
2016-11-09 13:54:10 +01:00
parent 2420ad56c1
commit 60e352fa09
+3 -2
View File
@@ -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}