Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function HideModelerElements(eventBus) {
var css = '.properties.hidden { display: none; } .tabs .tab.hidden { display: none; }',
head = document.head,
style = document.createElement('style');
style.type = 'text/css';
style.appendChild(document.createTextNode(css));
head.appendChild(style);
eventBus.on(TOGGLE_MODE_EVENT, function(context) {
var simulationModeActive = context.simulationModeActive;
var propertiesPanel = domQuery('.properties');
var xmlTab = domQuery('[data-tab-id="xml"') || domQuery('.tabs a.tab:not(.active)');
if (simulationModeActive) {
domClasses(propertiesPanel).add('hidden');
domClasses(xmlTab).add('hidden');
} else {
domClasses(propertiesPanel).remove('hidden');
domClasses(xmlTab).remove('hidden');
}
});
}