ieskudero/three-dxf-viewer

Text is not centered

Closed this issue · 4 comments

dxf files in cad, text can identify anchor points in the middle and lower, middle and upper. But in three-dxf-viewer it seems to always be the bottom left;

dxf zip is attached.

thank you!
Uploading test.zip…

dxf files in cad, text can identify anchor points in the middle and lower, middle and upper. But in three-dxf-viewer it seems to always be the bottom left;

dxf zip is attached.

thank you! Uploading test.zip…

test.zip

The cause of the problem should be
textEntity._getPosAndRotation does not use entity.hAlign and entity.vAlign, right?

Could be, I will try to check it.

Looks like you were right! The text needed vertical and horizontal alignment, as you suggested. I created a method to align the text, _alignText, but I would need a few more examples to fix all the possible alignments. I'll close this issue until more examples arrives with specific alignments. Thanks for the help!