[fix] text shape outline (#1974)
This PR fixes the text shape outline. ### Change Type - [x] `patch` — Bug fix
This commit is contained in:
parent
852187058a
commit
3fa7dd359d
2 changed files with 1 additions and 6 deletions
|
@ -840,6 +840,7 @@ input,
|
|||
min-width: 1px;
|
||||
min-height: 1px;
|
||||
overflow: visible;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.tl-text-content {
|
||||
|
|
|
@ -17,7 +17,6 @@ import {
|
|||
textShapeMigrations,
|
||||
textShapeProps,
|
||||
toDomPrecision,
|
||||
useValue,
|
||||
} from '@tldraw/editor'
|
||||
import { createTextSvgElementFromSpans } from '../shared/createTextSvgElementFromSpans'
|
||||
import { FONT_FAMILIES, FONT_SIZES, TEXT_PROPS } from '../shared/default-shape-constants'
|
||||
|
@ -86,8 +85,6 @@ export class TextShapeUtil extends ShapeUtil<TLTextShape> {
|
|||
handleDoubleClick,
|
||||
} = useEditableText(id, type, text)
|
||||
|
||||
const zoomLevel = useValue('zoomLevel', () => this.editor.zoomLevel, [this.editor])
|
||||
|
||||
return (
|
||||
<HTMLContainer id={shape.id}>
|
||||
<div
|
||||
|
@ -98,9 +95,6 @@ export class TextShapeUtil extends ShapeUtil<TLTextShape> {
|
|||
data-isediting={isEditing}
|
||||
data-textwrap={true}
|
||||
style={{
|
||||
outline: isEditing
|
||||
? `${1.5 / zoomLevel / shape.props.scale}px solid var(--color-selected)`
|
||||
: '',
|
||||
fontSize: FONT_SIZES[shape.props.size],
|
||||
lineHeight: FONT_SIZES[shape.props.size] * TEXT_PROPS.lineHeight + 'px',
|
||||
transform: `scale(${shape.props.scale})`,
|
||||
|
|
Loading…
Reference in a new issue