Arc Angles & Radius Scaling
Overview
Arc shapes render a full circle when startAngle equals endAngle, and resizing updates both radius and innerRadius to keep proportions.
A selected circle also exposes the same sweep model through its single arc handle:
- The handle starts on the right side of the circle.
- Dragging the handle up or down opens a gap continuously from a full circle toward a smaller sweep.
- The handle stays anchored on the circle radius during drag.
- Releasing the drag commits the conversion to
shapeType = 'arc'withstartAngle = 0andinnerRadius = 0.
API
editor.updateObjectProperty(arcId, 'startAngle', 45)
editor.updateObjectProperty(arcId, 'endAngle', 45)
editor.setObjectSize(arcId, 200, 200)
Notes
- When
startAngleequalsendAngle, the arc renders a full 360° sweep. - Resizing updates
radiusand preserves the existing inner/outer radius ratio. - Circle-to-arc conversion previews the sweep during
dragmoveand saves the final arc geometry ondragend.