1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/web/ synced 2025-03-09 00:00:01 +01:00

Label widget width now equal to maxWidth after edit

This commit is contained in:
Laura Fuentes Grau 2020-11-27 14:07:29 +01:00
parent cb308684b2
commit 4fd5d1bdfc

View file

@ -72,13 +72,14 @@ class EditWidgetDialog extends React.Component {
setMaxWidth(changeObject){
if(changeObject.type === 'Label'){
changeObject.customProperties.maxWidth = Math.ceil(this.getTextWidth(changeObject.name, changeObject.customProperties.textSize));
changeObject.width = changeObject.customProperties.maxWidth;
}
/*else if (changeObject.type === 'Value'){
changeObject.customProperties.maxWidth = Math.ceil(this.getTextWidth(changeObject.name, changeObject.customProperties.textSize));
}*/
}
if(this.state.temporal.width > changeObject.customProperties.maxWidth){
changeObject.width = changeObject.customProperties.maxWidth;
}
}*/
return changeObject;
}