From 4cb9d8cd332d9ec023d79f4bc10669ec59501861 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Szymon=20K=C5=82os?= Date: Fri, 9 Jul 2021 15:33:16 +0200 Subject: [PATCH] mobile-wizard: use mobile colorpickers for gradient MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Szymon Kłos Change-Id: Ic5ef466713cec184328d945424affb0d1a2a3b30 --- loleaflet/src/control/Control.MobileWizardBuilder.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/loleaflet/src/control/Control.MobileWizardBuilder.js b/loleaflet/src/control/Control.MobileWizardBuilder.js index 22e9b3e63..d5e5dca08 100644 --- a/loleaflet/src/control/Control.MobileWizardBuilder.js +++ b/loleaflet/src/control/Control.MobileWizardBuilder.js @@ -660,7 +660,17 @@ L.Control.MobileWizardBuilder = L.Control.JSDialogBuilder.extend({ return false; }, + // apply needed modifications for mobile + _modifySidebarNodes: function(data) { + for (var i in data) { + if ((data[i].id === 'fillgrad1' || data[i].id === 'fillgrad2') && data[i].type === 'menubutton') + data[i].type = 'colorlistbox'; + } + }, + build: function(parent, data) { + this._modifySidebarNodes(data); + for (var childIndex in data) { if (!data[childIndex]) continue;