Skip to content

Commit

Permalink
Chore: Remove unused type assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexIchenskiy committed Mar 7, 2024
1 parent 05584e0 commit dd3909c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/renderer/canvas/edge/base.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { INodeBase } from '../../../models/node';
import { IEdge, EdgeCurved, EdgeLoopback, EdgeStraight, IEdgeBase } from '../../../models/edge';
import { Color, IPosition } from '../../../common';
import { IPosition } from '../../../common';
import { drawLabel, Label, LabelTextBaseline } from '../label';
import { drawCurvedLine, getCurvedArrowShape } from './types/edge-curved';
import { drawLoopbackLine, getLoopbackArrowShape } from './types/edge-loopback';
Expand Down Expand Up @@ -150,16 +150,16 @@ const setupShadow = <N extends INodeBase, E extends IEdgeBase>(
const edgeStyle = edge.getStyle();

if (edgeStyle.shadowColor) {
context.shadowColor = (edgeStyle.shadowColor as string | Color).toString();
context.shadowColor = edgeStyle.shadowColor.toString();
}
if (edgeStyle.shadowSize) {
context.shadowBlur = edgeStyle.shadowSize as number;
context.shadowBlur = edgeStyle.shadowSize;
}
if (edgeStyle.shadowOffsetX) {
context.shadowOffsetX = edgeStyle.shadowOffsetX as number;
context.shadowOffsetX = edgeStyle.shadowOffsetX;
}
if (edgeStyle.shadowOffsetY) {
context.shadowOffsetY = edgeStyle.shadowOffsetY as number;
context.shadowOffsetY = edgeStyle.shadowOffsetY;
}
};

Expand Down

0 comments on commit dd3909c

Please sign in to comment.