prevent long names of sketch geometry from taking over whole screen and making 2d sketching in 3d difficult.

This commit is contained in:
Mike Molinari 2022-11-17 01:01:14 +00:00
parent c70ef0372b
commit 9d69c35920
5 changed files with 11 additions and 5 deletions

View file

@ -52,6 +52,7 @@
align-self: stretch;
display: flex;
flex-direction: column;
max-width: 25%;
}
.sketcherViewport {

View file

@ -79,7 +79,7 @@ export function ContextualControls() {
<span className={cx(ls.objectItem, getClassName(s))}>
<span className={ls.objectIcon}><ObjectIcon object={s} /></span>
{getObjectRole(s)}
<span className={cx(ls.objectTag, s.marked && ls.selected)}>{s.simpleClassName}&nbsp;<span>{s.id}</span> </span>
<span className={cx(ls.objectTag, s.marked && ls.selected)}>{s.simpleClassName}&nbsp;{s.id} </span>
<span className={ls.removeButton} onClick={() => ctx.viewer.remove(s)}><Fa icon='times'/></span>
</span>
</div>)

View file

@ -7,6 +7,8 @@
background-color: #000D;
color: white;
pointer-events: auto;
overflow-wrap: anywhere;
}
.item {
@ -27,6 +29,7 @@
pointer-events: auto;
display: flex;
align-items: stretch;
max-width:300px;
@alt-color: #9c9c9c;

View file

@ -58,10 +58,10 @@ export function SketchObjectExplorer() {
return <span title="object is a readonly 3D feature/boundary" className={cx(ls.objectRole, ls.aux)}>B</span>
} else if (o.role === 'construction') {
return <span onClick={e => tweakRole(o)} title="construction object not used for 3D operations"
className={cx(ls.objectRole, ls.construction)}>C</span>
className={cx(ls.objectRole, ls.construction)}>C</span>
} else {
return <span onClick={e => tweakRole(o)} title="sketch object participates in 3D operations"
className={cx(ls.objectRole, ls.sketch)}>S</span>
className={cx(ls.objectRole, ls.sketch)}>S</span>
}
};
@ -69,10 +69,10 @@ export function SketchObjectExplorer() {
<div className={ls.titleBar}>Objects</div>
<div className={ls.scrollableArea}>
{objects.map(o => <div key={o.id} className={cx(ls.objectItem, getClassName(o))}>
<span className={ls.objectIcon}><ObjectIcon object={o}/></span>
<span className={ls.objectIcon}><ObjectIcon object={o} /></span>
{getObjectRole(o)}
<span onClick={e => tweakSelection(o, e.shiftKey)}
className={cx(ls.objectTag, o.marked && ls.selected)}>{o.simpleClassName}&nbsp;<span>{o.id}</span> </span>
className={cx(ls.objectTag, o.marked && ls.selected)}>{o.simpleClassName}&nbsp;{o.id} </span>
<span className={ls.menuButton}>...</span>
</div>)}
</div>

View file

@ -8,6 +8,7 @@
pointer-events: auto;
display: flex;
align-items: stretch;
overflow-wrap: anywhere;
@alt-color: #9c9c9c;
@ -15,6 +16,7 @@
border-radius: @itemRadius 0 0 @itemRadius;
padding: 3px 3px;
background-color: @alt-color;
text-align: center;
& svg {
width: 16px;
height: 16px;