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' with startAngle = 0 and innerRadius = 0.

API

editor.updateObjectProperty(arcId, 'startAngle', 45)
editor.updateObjectProperty(arcId, 'endAngle', 45)
editor.setObjectSize(arcId, 200, 200)

Notes

  • When startAngle equals endAngle, the arc renders a full 360° sweep.
  • Resizing updates radius and preserves the existing inner/outer radius ratio.
  • Circle-to-arc conversion previews the sweep during dragmove and saves the final arc geometry on dragend.