Skip to content

Commit

Permalink
handle type
Browse files Browse the repository at this point in the history
  • Loading branch information
OrionReed committed Dec 3, 2024
1 parent 2e7d6b0 commit d85f0b5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/folk-shape.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ const resizeObserver = new ResizeObserverManager();

export type Shape = 'rectangle' | 'circle' | 'triangle';

type Handle = 'resize-nw' | 'resize-ne' | 'resize-se' | 'resize-sw' | 'rotation' | 'move';

export type TransformEventDetail = {
rotate: number;
};
Expand Down Expand Up @@ -405,7 +407,7 @@ export class FolkShape extends HTMLElement {
return;
}

const handle = target.getAttribute('part');
const handle = target.getAttribute('part') as Handle;

if (handle === null) return;

Expand Down

0 comments on commit d85f0b5

Please sign in to comment.