handle type

This commit is contained in:
Orion Reed 2024-12-03 00:55:55 -05:00
parent 2e7d6b0783
commit d85f0b5cb0
1 changed files with 3 additions and 1 deletions

View File

@ -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;
};
@ -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;