called getConfig() once in draw function and used returned value elsewhere within

Co-authored-by: Shahir Ahmed <ahmeds@dickinson.edu>
This commit is contained in:
pranavm2109
2025-01-29 14:45:42 -05:00
parent 03ff28e927
commit 384f59eee2

View File

@@ -48,12 +48,13 @@ function drawActorLegend(diagram) {
const conf = getConfig().journey;
const LEFT_MARGIN = conf.leftMargin;
export const draw = function (text, id, version, diagObj) {
const conf = getConfig().journey;
const titleColor = getConfig().themeVariables.titleColor;
const titleFontSize = getConfig().themeVariables.titleFontSize;
const titleFontFamily = getConfig().themeVariables.titleFontFamily;
const configObject = getConfig();
const conf = configObject.journey;
const titleColor = configObject.themeVariables.titleColor;
const titleFontSize = configObject.themeVariables.titleFontSize;
const titleFontFamily = configObject.themeVariables.titleFontFamily;
const securityLevel = getConfig().securityLevel;
const securityLevel = configObject.securityLevel;
// Handle root and Document for when rendering in sandbox mode
let sandboxElement;
if (securityLevel === 'sandbox') {