From 3694258e99130fc7312a206bbe83cb173747cf43 Mon Sep 17 00:00:00 2001 From: Pranam Lashkari Date: Fri, 3 Mar 2023 02:36:24 +0530 Subject: [PATCH] jsdialog: support toggle event for push buttons Signed-off-by: Pranam Lashkari Change-Id: Ibd5a2d6de35c2f7142afe0254f4133746152226d --- browser/src/control/Control.JSDialogBuilder.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/browser/src/control/Control.JSDialogBuilder.js b/browser/src/control/Control.JSDialogBuilder.js index 966bf2e4d..fdf632f04 100644 --- a/browser/src/control/Control.JSDialogBuilder.js +++ b/browser/src/control/Control.JSDialogBuilder.js @@ -1520,7 +1520,7 @@ L.Control.JSDialogBuilder = L.Control.extend({ else if (builder._responses[pushbutton.id] !== undefined) pushbutton.onclick = builder.callback.bind(builder, 'responsebutton', 'click', { id: pushbutton.id }, builder._responses[pushbutton.id], builder); else - pushbutton.onclick = builder.callback.bind(builder, 'pushbutton', 'click', pushbutton, data.command, builder); + pushbutton.onclick = builder.callback.bind(builder, 'pushbutton', data.isToggle ? 'toggle' : 'click', pushbutton, data.command, builder); builder.map.hideRestrictedItems(data, wrapper, pushbutton); builder.map.disableLockedItem(data, wrapper, pushbutton);