fix: enlarge arrow head

This commit is contained in:
Peng Xiao
2022-06-19 16:50:52 +08:00
parent 0a8b739a70
commit 4e2e3266c2
3 changed files with 3 additions and 2 deletions

View File

@@ -263,6 +263,7 @@ export class LogseqPortalShape extends TLBoxShape<LogseqPortalShapeProps> {
// @ts-expect-error ???
'--ls-primary-background-color': fill,
'--ls-primary-text-color': stroke,
'--ls-title-text-color': stroke,
}}
>
<LogseqPortalShapeHeader type="P" pageId={pageId} />

View File

@@ -32,7 +32,7 @@ export const Arrow = React.memo(function StraightArrow({
// Path between start and end points
const path = 'M' + Vec.toFixed(start) + 'L' + Vec.toFixed(end)
// Arrowheads
const arrowHeadLength = Math.min(arrowDist / 3, strokeWidth * 8)
const arrowHeadLength = Math.min(arrowDist / 3, strokeWidth * 16)
const startArrowHead = decorationStart
? getStraightArrowHeadPoints(start, end, arrowHeadLength)
: null

View File

@@ -46,7 +46,7 @@ export function getArrowPath(
) {
const strokeWidth = style.strokeWidth
const arrowDist = Vec.dist(start, end)
const arrowHeadLength = Math.min(arrowDist / 3, strokeWidth * 8)
const arrowHeadLength = Math.min(arrowDist / 3, strokeWidth * 16)
const path: (string | number)[] = []
path.push(`M ${start} L ${end}`)
if (decorationStart) {