From 9f1dc59a43b91ee6af19d8558fbb37f549f64010 Mon Sep 17 00:00:00 2001 From: Martin Stamm Date: Mon, 30 Jan 2023 11:56:55 +0100 Subject: [PATCH] fix(ContextPads): don't show context pads when disabled related to https://github.com/camunda/camunda-modeler-token-simulation-plugin/issues/60 --- lib/features/context-pads/ContextPads.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/features/context-pads/ContextPads.js b/lib/features/context-pads/ContextPads.js index 0f133755..413dcc4e 100644 --- a/lib/features/context-pads/ContextPads.js +++ b/lib/features/context-pads/ContextPads.js @@ -54,7 +54,7 @@ export default function ContextPads( this.registerHandler('bpmn:Activity', TriggerHandler); eventBus.on(TOGGLE_MODE_EVENT, LOW_PRIORITY, context => { - const active = context.active; + const active = this._active = context.active; if (active) { this.openContextPads(); @@ -136,6 +136,10 @@ ContextPads.prototype.getHandlers = function(element) { ContextPads.prototype.openContextPads = function(parent) { + if (!this._active) { + return; + } + if (!parent) { parent = this._canvas.getRootElement(); }