Browse Source

style: run prettier

Konstantinos Kaloutas 2 years ago
parent
commit
2673cbef33

+ 14 - 14
tldraw/apps/tldraw-logseq/src/lib/shapes/LineShape.tsx

@@ -75,13 +75,13 @@ export class LineShape extends TLLineShape<LineShapeProps> {
       id,
     } = this.props
     const labelSize =
-    label || isEditing
-      ? getTextLabelSize(
-          label,
-          { fontFamily: 'var(--ls-font-family)', fontSize, lineHeight: 1, fontWeight },
-          6
-        )
-      : [0, 0]
+      label || isEditing
+        ? getTextLabelSize(
+            label,
+            { fontFamily: 'var(--ls-font-family)', fontSize, lineHeight: 1, fontWeight },
+            6
+          )
+        : [0, 0]
     const midPoint = Vec.med(start.point, end.point)
     const dist = Vec.dist(start.point, end.point)
     const scale = Math.max(
@@ -149,13 +149,13 @@ export class LineShape extends TLLineShape<LineShapeProps> {
     } = this.props
     const bounds = this.getBounds()
     const labelSize =
-    label || isEditing
-      ? getTextLabelSize(
-          label,
-          { fontFamily: 'var(--ls-font-family)', fontSize, lineHeight: 1, fontWeight },
-          6
-        )
-      : [0, 0]
+      label || isEditing
+        ? getTextLabelSize(
+            label,
+            { fontFamily: 'var(--ls-font-family)', fontSize, lineHeight: 1, fontWeight },
+            6
+          )
+        : [0, 0]
     const midPoint = Vec.med(start.point, end.point)
     const dist = Vec.dist(start.point, end.point)
     const scale = Math.max(

+ 1 - 1
tldraw/apps/tldraw-logseq/src/lib/shapes/arrow/Arrow.tsx

@@ -41,7 +41,7 @@ export const Arrow = React.memo(function StraightArrow({
   const arrowDist = Vec.dist(start, end)
   if (arrowDist < 2) return null
   const { strokeWidth } = style
-  const sw = 1 + strokeWidth * levelToScale[scaleLevel ?? 'md'] / 10
+  const sw = 1 + (strokeWidth * levelToScale[scaleLevel ?? 'md']) / 10
   // Path between start and end points
   const path = 'M' + Vec.toFixed(start) + 'L' + Vec.toFixed(end)
   // Arrowheads