arrows: separate out handle behavior from labels (#2621)
This is a followup on the arrows work. - allow labels to go to the ends if no arrowhead is present - avoid using / overloading TLHandle and use a new PointingLabel state to specifically address label movement - removes the feature flag to launch this feature! ### Change Type - [x] `patch` — Bug fix ### Release Notes - Arrow labels: provide more polish on label placement --------- Co-authored-by: Steve Ruiz <steveruizok@gmail.com>
This commit is contained in:
parent
f87702bda4
commit
34a95b2ec8
22 changed files with 572 additions and 445 deletions
|
@ -14,14 +14,6 @@ export type TLHandleComponent = ComponentType<{
|
|||
|
||||
/** @public */
|
||||
export const DefaultHandle: TLHandleComponent = ({ handle, isCoarse, className, zoom }) => {
|
||||
if (handle.type === 'text-adjust') {
|
||||
return (
|
||||
<g className={classNames('tl-handle', 'tl-handle__text-adjust', className)}>
|
||||
<rect rx={4} ry={4} width={handle.w} height={handle.h} />
|
||||
</g>
|
||||
)
|
||||
}
|
||||
|
||||
const bgRadius = (isCoarse ? COARSE_HANDLE_RADIUS : HANDLE_RADIUS) / zoom
|
||||
const fgRadius = (handle.type === 'create' && isCoarse ? 3 : 4) / zoom
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue