fix: minor style change

This commit is contained in:
Peng Xiao
2022-08-24 15:30:31 +08:00
parent 288d37602f
commit f6a70df284
3 changed files with 12 additions and 3 deletions

View File

@@ -2247,6 +2247,7 @@
block-el-id (str "ls-block-" blocks-container-id "-" uuid)
config {:id (str uuid)
:db/id (:db/id block-entity)
:block/uuid uuid
:block? true
:editor-box (state/get-component :editor/box)}
edit-input-id (str "edit-block-" blocks-container-id "-" uuid)

View File

@@ -792,7 +792,7 @@ export class LogseqPortalShape extends TLBoxShape<LogseqPortalShapeProps> {
ReactIndicator = observer(() => {
const bounds = this.getBounds()
return <rect width={bounds.width} height={bounds.height} fill="transparent" />
return <rect width={bounds.width} height={bounds.height} fill="transparent" stroke="none" />
})
validateProps = (props: Partial<LogseqPortalShapeProps>) => {

View File

@@ -14,7 +14,7 @@ export const SelectionForeground = observer(function SelectionForeground<S exten
shapes,
}: TLSelectionComponentProps<S>) {
const app = useApp()
const { width, height } = bounds
let { width, height } = bounds
const zoom = app.viewport.camera.zoom
const size = 8 / zoom
@@ -22,12 +22,20 @@ export const SelectionForeground = observer(function SelectionForeground<S exten
const canResize = shapes.length === 1 ? shapes[0].canResize : [true, true]
const editing = !!app.editingShape
// when editing, make the selection a bit larger
width = editing ? width + 2 : width
height = editing ? height + 2 : height
return (
<SVGContainer>
<SVGContainer style={{ transform: editing ? 'translate(-1px, -1px)' : 'none' }}>
<rect
className="tl-bounds-fg"
width={Math.max(width, 1)}
height={Math.max(height, 1)}
rx={editing ? 4 : 0}
ry={editing ? 4 : 0}
pointerEvents="none"
/>
<EdgeHandle