frappe / frappe/draw

Elbow connectors have no draggable bend/turn point — the corner is a fixed midpoint

Open
#573 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
21
Forks
13
Avg merge
2d 18h
Merged PRs (30d)
24

Description

## Reported via manual QA

The curve of a curved connector can be dragged/controlled, but there is no equivalent control for an elbow (orthogonal) connector's bend point. The user should be able to control where an elbow connector turns, the same way a curved connector's curve can be controlled.

## Current behavior

`elbow` is a real connector route type (see `frontend/src/diagram/connectorSpecs.js` / `flowchartLayout.js`), but `frontend/src/components/canvas/ConnectorView.vue` (~line 71) computes the turn point as a hardcoded fixed midpoint:
```js
elbowMidX = (start.x + end.x) / 2
```
— not stored/persisted state, and not draggable. The selection-handles block in the same file (~lines 420-459) only gives a draggable control-point circle to `connector.type === 'curved'` connectors (this is what #560 added — "curved connector's control-point drag now tracks the cursor at any zoom/pan"). Elbow connectors never got an equivalent handle.

## Expected behavior

An elbow connector's bend/turn point should be draggable, the same interaction model #560 already built for curved connectors' control point — drag to move where the connector turns, tracked correctly at any zoom/pan, and persisted on the connector so it survives reload.

## Where to look

- `frontend/src/components/canvas/ConnectorView.vue` — `elbowMidX` computation (~line 71) needs to become a stored, draggable value instead of a fixed derived midpoint; selection-handles block (~lines 420-459) needs an elbow branch alongside the existing curved one
- `frontend/src/diagram/connectorMove.js` — where the curved control-point drag logic lives; the elbow bend-point drag should follow the same pattern
- Whatever persists a curved connector's control-point offset on the connector object — the elbow bend point needs the equivalent field

## Related
#560 (closed) — added draggable curve control for curved connectors; this is the same feature for elbow connectors, never built.

Contributor guide

Open the contributing guide

Research direction

Start in frontend/src/components/canvas/ConnectorView.vue, reading the elbowMidX computation and the selection-handles block, then compare the curved control-point behavior in frontend/src/diagram/connectorMove.js. Trace how the curved control-point offset is stored on the connector. Done means an elbow bend handle can be dragged at any zoom or pan and its position persists after reload.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.