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
{{ message }}
Repository navigation
SlopeAnnotationsTool: the label is upside down when the slope arrow points left (no readability flip, unlike linear and angle annotations) #849
SlopeAnnotationsTool._positionLabel (packages/front/src/drawings/DrawingEditor/src/SlopeAnnotationsTool/index.ts, 3.6.0 and main, line 498) rotates the label by the exact angle of the arrow:
So when the surface slopes down towards the left of the sheet, the label is rotated 180° and reads upside down. When it slopes straight down the sheet, it reads from top to bottom instead of from bottom to top. A slope arrow points downhill, so on a roof plan half of the arrows point left.
The other annotation tools already keep their text readable:
LinearAnnotationsTool/index.ts, line 411: if (angle > Math.PI / 2 || angle <= -Math.PI / 2) angle += Math.PI;
AngleAnnotationsTool/index.ts, lines 344–345: the same normalization to (−90°, 90°].
Suggested fix (the same rule as the linear annotations; the arrow is unchanged and the label stays on the same side, since its position does not depend on the angle):
The preview label (line 399, same _positionLabel) would follow.
Reproduction ▶️
No response
Steps to reproduce 🔢
Open a technical drawing in the DrawingEditor with SlopeAnnotationsTool in use (it creates the labels).
Add two slope annotations: slopeTool.system.add(drawing, { position: new THREE.Vector3(0, 0, 0), direction: new THREE.Vector3(1, 0, 0), slope: 0.6, style: "default" }), and the same with direction: new THREE.Vector3(-1, 0, 0).
The first label reads normally; the second one is rotated 180° and reads upside down. With direction: new THREE.Vector3(0, 0, 1) (down the sheet) it reads from top to bottom.
System Info 💻
OS: Windows 11 Pro 10.0.26200
Node: 22.17.0 · npm 10.9.2
Browser: Chrome 155
@thatopen/components 3.6.0 · @thatopen/components-front 3.6.0 · @thatopen/fragments 3.6.0 · three 0.185.0
Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Make sure this is a repository issue and not a framework-specific issue. For example, if it's a THREE.js related bug, it should likely be reported to mrdoob/threejs instead.
Check that this is a concrete bug. For Q&A join our Community.
Hi!
I'd like to take this one. My plan is to apply the same angle
normalization as LinearAnnotationsTool (lines 388/411) inside
_positionLabel, which also fixes the preview label. I'll use Claude Code
for assistance and review every change myself before opening the PR.
Activity
Zizou-PM commentedon Nov 14, 2026
Hi!
I'd like to take this one. My plan is to apply the same angle
normalization as LinearAnnotationsTool (lines 388/411) inside
_positionLabel, which also fixes the preview label. I'll use Claude Code
for assistance and review every change myself before opening the PR.