Deactivation and activation of modules

Hello,

I am currently developing with your BPMS-JS library. I have the modules:

             additionalModules: [
                {
                    moveCanvas: ['value', ''],   // Deaktiviert das Verschieben des Canvas durch die Maus
                    zoomScroll: ['value', '']    // Deaktiviert das Verschieben durch Zoomen mit der Maus
                }
            ]

to deactivate the automatic move and zoom.

The problem now is that I have some constellations where I want to reactivate zooming / moving. How do I go about “resetting” the modules or reloading them as they were at the beginning?

Thank you in advance for your feedback.

J

Hello,

A short addendum to clarify what I meant:

I have a “Fullscreen” button on which an EventListener is registered. The button ensures (onclick) that the canvas element is displayed in the full screen… As soon as this happens, I want zooming/moving to be activated again. I would like to leave it deactivated beforehand.

 var fullscreenButton = document.getElementById("fullscreenButton");
  fullscreenButton.addEventListener("click", toggleFullscreen);
function toggleFullscreen() {
// enable fullscreen
// HowTo: reactivate the zooming / moving of the canvas element.
}

Does anyone have any ideas?

Thanks!

You cannot unfortunately dynamically enable or disable modules. What these modules should have baked in is APIs that allow you to enable and disable them. If that is not the case, then it is something that we could decide to build, or you contribute it.

Hello nikku,

Thank you for your answer. I am currently already deactivating “dynamic” with the code below.

In short, there is no way after I run the following code to re-enable the modules?

 additionalModules: [
                {
                    moveCanvas: ['value', ''],   // Deaktiviert das Verschieben des Canvas durch die Maus
                    zoomScroll: ['value', '']    // Deaktiviert das Verschieben durch Zoomen mit der Maus
                }
            ]