You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, for some reason i can't seem to find the length of a wall, except for the height and width, but when i select an element to edit the property, i am able to see it there
Below is an property object of a wall when i log state in the console: As You can see the width is missing for a wall.
Please how can i add the width of a wall or modify the property of any item to have a complete property as i want, Thank you in advance.
The text was updated successfully, but these errors were encountered:
chinyart
changed the title
Adding length of an element in properties
Adding length of a wall in properties
Nov 24, 2020
Hi @danilosalvati, thank you for your quick response, i really appreciate it, i followed your advice and found this snippet to be used somewhere to get lineLength.
I made use of this method to get the width:
var x1, x2, y1, y2;
var vertices = this.props.state.getIn(['scene', 'layers', _obj, 'lines', childProperties.id, 'vertices']);
var _state$getIn2 = this.props.state.getIn(['scene', 'layers', _obj, 'vertices', vertices.get(0)]),
x1 = _state$getIn2.x,
y1 = _state$getIn2.y;
var _state$getIn3 = this.props.state.getIn(['scene', 'layers', _obj, 'vertices', vertices.get(1)]),
x2 = _state$getIn3.x,
y2 = _state$getIn3.y;
var width = GeometryUtils.pointsDistance(x1, y1, x2, y2);
Vertices as a variable is not empty, but i get an undefined error on vertices.get(0)
please what am i doing wrong from the snippet above and what should i do instead?, thank you in advance.
Hi, for some reason i can't seem to find the length of a wall, except for the height and width, but when i select an element to edit the property, i am able to see it there
Below is an property object of a wall when i log state in the console:
As You can see the width is missing for a wall.
Please how can i add the width of a wall or modify the property of any item to have a complete property as i want, Thank you in advance.
The text was updated successfully, but these errors were encountered: