Text-Editor: Toggle "Masstäblich" (AnnotationScaling)
Neuer Pill-Button in Row 3 neben "Zur Kamera": setzt TextEntity.AnnotationScalingEnabled. Property-Name wird in mehreren Varianten probiert (Rhino 8 API hat das je nach Build leicht anders benannt). Zustand wird zusaetzlich als UserString "dossier_text_scaled" persistiert, sodass open_for_edit den Toggle auch dann korrekt restored wenn die API-Property nicht gelesen werden kann. Default = an (entspricht aktuellem Verhalten: Text skaliert mit der Annotation-Scale des Layouts). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -248,6 +248,7 @@ export default function TextEditorApp() {
|
||||
const [horizontalToView, setHorizontalToView] = useState(false)
|
||||
const [rotation, setRotation] = useState(0)
|
||||
const [valign, setVAlign] = useState('top') // top | middle | bottom
|
||||
const [scaleWithModel, setScaleWithModel] = useState(true)
|
||||
const [maskType, setMaskType] = useState('none') // none | viewport | solid
|
||||
const [maskColor, setMaskColor] = useState([255, 255, 255])
|
||||
const [maskMargin, setMaskMargin] = useState(0)
|
||||
@@ -328,6 +329,7 @@ export default function TextEditorApp() {
|
||||
if (s.underline != null) setUnderline(!!s.underline)
|
||||
if (s.align) setAlign(s.align)
|
||||
if (s.valign) setVAlign(s.valign)
|
||||
if (s.scaleWithModel != null) setScaleWithModel(!!s.scaleWithModel)
|
||||
if (s.maskType) setMaskType(s.maskType)
|
||||
if (Array.isArray(s.maskColor)) setMaskColor(s.maskColor)
|
||||
// Bei Edit-Mode: bestehenden Text in den Editor laden. Wenn Runs
|
||||
@@ -467,7 +469,7 @@ export default function TextEditorApp() {
|
||||
runs,
|
||||
settings: {
|
||||
font, size, bold, italic, underline, align, valign, color,
|
||||
frame, horizontalToView, rotation,
|
||||
frame, horizontalToView, rotation, scaleWithModel,
|
||||
maskType, maskColor, maskMargin,
|
||||
},
|
||||
})
|
||||
@@ -659,6 +661,12 @@ export default function TextEditorApp() {
|
||||
<Icon name="screen_rotation" size={13} />
|
||||
<span style={{ fontSize: 10 }}>Zur Kamera</span>
|
||||
</Pill>
|
||||
<Pill active={scaleWithModel}
|
||||
onClick={() => setScaleWithModel(b => !b)}
|
||||
title="Text skaliert sich mit dem Massstab (Annotation Scaling). Aus = absolute Modellhöhe.">
|
||||
<Icon name="zoom_out_map" size={13} />
|
||||
<span style={{ fontSize: 10 }}>Masstäblich</span>
|
||||
</Pill>
|
||||
<div style={{ position: 'relative' }}>
|
||||
<Pill onClick={() => setSymbolsOpen(o => !o)}
|
||||
active={symbolsOpen}
|
||||
|
||||
Reference in New Issue
Block a user