diff options
author | Henry Castro <hcastro@collabora.com> | 2019-10-30 13:20:14 -0400 |
---|---|---|
committer | Henry Castro <hcastro@collabora.com> | 2019-10-31 17:11:32 +0100 |
commit | 97573d57c23bdf13b5473ddcd593140ad06eff57 (patch) | |
tree | a53489277f0563003107225298d39f332819dabc | |
parent | bea95e329b17ea4365453c63ee88cf81bf54585e (diff) |
mobileWizard: set a new "maxHeight" option
Add a new option to the class L.Control.MobileWizard with the
purpose to define a maximum height of the mobile wizard container.
Change-Id: I7af5f4d087d10442b281002b57c9d0f43c4385e5
Reviewed-on: https://gerrit.libreoffice.org/81794
Reviewed-by: Henry Castro <hcastro@collabora.com>
Tested-by: Henry Castro <hcastro@collabora.com>
-rw-r--r-- | loleaflet/src/control/Control.MobileWizard.js | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/loleaflet/src/control/Control.MobileWizard.js b/loleaflet/src/control/Control.MobileWizard.js index fd93b9117..8622eb08a 100644 --- a/loleaflet/src/control/Control.MobileWizard.js +++ b/loleaflet/src/control/Control.MobileWizard.js @@ -5,6 +5,9 @@ /* global $ w2ui _ */ L.Control.MobileWizard = L.Control.extend({ + options: { + maxHeight: '45%' + }, _inMainMenu: true, _isActive: false, @@ -13,6 +16,10 @@ L.Control.MobileWizard = L.Control.extend({ _isTabMode: false, _currentPath: [], + initialize: function (options) { + L.setOptions(this, options); + }, + onAdd: function (map) { this.map = map; map.on('mobilewizard', this._onMobileWizard, this); @@ -178,7 +185,7 @@ L.Control.MobileWizard = L.Control.extend({ else $('#mobile-wizard').css('top', $('#document-container').css('top')); } else { - $('#mobile-wizard').height('45%'); + $('#mobile-wizard').height(this.options.maxHeight); $('#mobile-wizard').css('top', ''); } |