HaloHandle
type HaloHandle = Omit<ui.Halo.Handle, "attrs" | "events" | "position" | "name"> & object;
A Halo handle: the React-facing handle config. Mirrors the relevant
ui.Halo.Handle fields with React-friendly types (content as a node,
contextual events, group in place of native position), plus per-handle
makeElement / makeLink factories.
Type Declaration
| Name | Type | Description |
|---|---|---|
className? | string | Extra CSS class on the handle button. |
content? | ReactNode | Handle button content. A string is used as raw HTML; a React node is pre-rendered and serialized to static HTML, handle content is presentational (the click is handled by ui.Halo), so static markup is enough. No live re-render inside the content. |
defaultAction? | string | The built-in action this handle derives from (e.g. 'fork'); set by getHaloDefaultHandle. |
events? | HaloHandleEvents | Pointer / context-menu callbacks; receive { event, x, y, model, paper, graph }. |
group? | ui.Halo.Handle["position"] | Handle group / anchor: the React rename of the native position field. toNativeHandle maps it back to position; getHaloDefaultHandle derives it from the native default's position. |
hideOnDrag? | boolean | Hide this handle while dragging. |
icon? | string | Background-image icon URL for the handle button. |
makeElement? | HaloMakeElement | Element factory for a clone / fork handle. Return a JointJS element instance or a React ElementRecord (coerced to an ElementModel). Capture per-handle context via the closure; ui.Halo positions the element. |
makeLink? | HaloMakeLink | Link factory for a link / fork handle. Return a JointJS link instance or a React LinkRecord (coerced to a LinkModel). ui.Halo sets the link's source / target. |
name? | string | Unique handle key. Optional: when omitted (or duplicated), resolveHandleNames generates a stable handle-<index> name. |
title? | string | Tooltip text set as the title attribute on the handle button. |