prevent dummy breaking things

This commit is contained in:
jrkb 2023-10-13 17:11:40 +02:00
parent 21a5888022
commit 494f562b3b

View file

@ -463,11 +463,14 @@ const Layer = function(tp, layerID, fontsAndAxes, autoInit = true) {
const panelProp= tp.getPanelPropTitle(propName);
const panelPropMom = tp.getPanelPropContainer(panelProp);
const newValue = active ? getArtboard().theatreObject.value.width : 0;
const textWrappingButton = tp.getPanel().querySelector('.textWrappingButton');
if (panelPropMom !== null && textWrappingButton !== null) {
if (active) {
panelPropMom.style.display = 'flex';
tp.getPanel().querySelector('.textWrappingButton').classList.add('active');
textWrappingButton.classList.add('active');
} else {
tp.getPanel().querySelector('.textWrappingButton').classList.remove('active');
textWrappingButton.classList.remove('active');
panelPropMom.style.display = 'none';
}
@ -478,6 +481,7 @@ const Layer = function(tp, layerID, fontsAndAxes, autoInit = true) {
set(this.theatreObject.props[propName], newValue);
});
}
}
}
};