"Start and End Point Logic Issue in Figma Plugin: Need Help!" hello eveyone,
I have creating a plugin similar to Autoflow, Currently I facing the problem on the logic for determining the start and end points is incorrect
If I select two frames, the stroke caps sometimes flip because of their positions.
The connector doesn’t consistently follow the rule: **First frame = Round Cap, Second frame = Arrow Cap
What I want?
The first selected frame should always have the round cap,
The second selected frame should always have the arrow cap,
This should remain consistent regardless of the frame positions, sides, or canvas layout.
import { showUI, on, emit } from '@create-figma-plugin/utilities';
type Side = "top" | "right" | "bottom" | "left";
type Point = { x: number; y: number };
let frameA: FrameNode;
let frameB: FrameNode;
let isDrawingEnabled = true; // Controls whether to draw connectors
let trackedFrames: { frameA: FrameNode; fra