@@ -10,7 +10,6 @@ import { ConnectableEntity } from "@/core/stage/stageObject/abstract/Connectable
1010import { LineEdge } from "@/core/stage/stageObject/association/LineEdge" ;
1111import { Edge } from "@/core/stage/stageObject/association/Edge" ;
1212import { ConnectPoint } from "@/core/stage/stageObject/entity/ConnectPoint" ;
13- import { Section } from "@/core/stage/stageObject/entity/Section" ;
1413import { TextNode } from "@/core/stage/stageObject/entity/TextNode" ;
1514import { SvgUtils } from "@/core/render/svg/SvgUtils" ;
1615import { EdgeRendererClass } from "@/core/render/canvas2d/entityRenderer/edge/EdgeRendererClass" ;
@@ -110,14 +109,7 @@ export class StraightEdgeRenderer extends EdgeRendererClass {
110109 : edge . color ;
111110
112111 let edgeWidth = 2 ;
113- if ( Settings . enableAutoEdgeWidth && edge . target instanceof Section && edge . source instanceof Section ) {
114- const rect1 = edge . source . collisionBox . getRectangle ( ) ;
115- const rect2 = edge . target . collisionBox . getRectangle ( ) ;
116- edgeWidth = Math . min (
117- Math . min ( Math . max ( rect1 . width , rect1 . height ) , Math . max ( rect2 . width , rect2 . height ) ) / 100 ,
118- 100 ,
119- ) ;
120- } else if ( edge . source instanceof TextNode ) {
112+ if ( edge . source instanceof TextNode ) {
121113 edgeWidth = edge . source . getBorderWidth ( ) ;
122114 }
123115 const straightBodyLine = edge . bodyLine ;
@@ -151,13 +143,12 @@ export class StraightEdgeRenderer extends EdgeRendererClass {
151143 }
152144
153145 public getNormalStageSvg ( edge : LineEdge ) : React . ReactNode {
154- let lineBody : React . ReactNode = < > </ > ;
155- let textNode : React . ReactNode = < > </ > ;
156146 const edgeColor = edge . color . equals ( Color . Transparent )
157147 ? this . project . stageStyleManager . currentStyle . StageObjectBorder
158148 : edge . color ;
159- lineBody = SvgUtils . line ( edge . bodyLine . start , edge . bodyLine . end , edgeColor , 2 ) ;
149+ const lineBody = SvgUtils . line ( edge . bodyLine . start , edge . bodyLine . end , edgeColor , 2 ) ;
160150
151+ let textNode : React . ReactNode = < > </ > ;
161152 if ( edge . text . trim ( ) !== "" ) {
162153 textNode = SvgUtils . textFromCenterWithStroke (
163154 edge . text ,
0 commit comments