I'm currently working with the Bpmn library to create a diagram.
However, I've encountered an issue where I need to hide the palette in the diagram view dynamically. I attempted to achieve this by using @ViewChild in my TypeScript file to target the element and apply CSS styles to hide it.
@ViewChild('djs-palette-entries') actionsPalette: ElementRef<HTMLDivElement>
togglePalette(){
const paletteEntries = this.actionsPalette.nativeElement
if (paletteEntries) {
if (this.showPaletteEntries) {
this.renderer.setStyle(paletteEntries, 'display', 'block');
} else {
this.renderer.setStyle(paletteEntries, 'display', 'none');
}
}
}
The issue lies in the fact that the element 'djs-palette-entries' is generated by the BPMN library and is not visible in the HTML structure...
Unfortunately, the code is not functioning as expected. What would be the most effective approach to dynamically hide this element?
I tried using @ViewChild but the element remains visible.