togglePalette v. toggleSidebar

Hi There,

I was wondering why togglePalette isn't exposed (i.e. exported) as a method a-la toggleSidebar?

Basically I want to hide the sidebar and palette on Mobile and am now doing this:

RED.sidebar.toggleSidebar(false);
$("#red-ui-main-container").addClass("red-ui-palette-closed");

to achieve that.

The second lines comes from here.

Hi @gregorius

It is exposed as an action:

RED.actions.invoke("core:toggle-palette", false)

Similarly, you should use the equivalent action for toggling the sidebar:

RED.actions.invoke("core:toggle-sidebar", false)

Sweet, thanks for that :+1:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.