@idraw/types
Advanced tools
Comparing version 0.2.0-alpha.21 to 0.2.0-alpha.22
{ | ||
"name": "@idraw/types", | ||
"version": "0.2.0-alpha.21", | ||
"version": "0.2.0-alpha.22", | ||
"description": "", | ||
@@ -11,3 +11,3 @@ "main": "src/index.ts", | ||
"files": [ | ||
"src", | ||
"src/**/*.ts", | ||
"index.ts" | ||
@@ -26,3 +26,3 @@ ], | ||
}, | ||
"gitHead": "befdf7cdb086bbe017de65ebcba8f2a438184a12" | ||
"gitHead": "884153bfe050aee75f4d132316db3bb750371375" | ||
} |
@@ -6,34 +6,32 @@ import { TypeData } from './data'; | ||
export type TypeHelperPluginEventDetail = { | ||
controller: string | null, | ||
point: TypePoint, | ||
selectedElement: TypeElement<keyof TypeElemDesc> | null, | ||
data: TypeData, | ||
helperCtx:TypeContext, | ||
} | ||
export interface InterfacePlugin { | ||
onHover?: (detail: { | ||
point: TypePoint, | ||
selectedElement: TypeElement<keyof TypeElemDesc> | null, | ||
data: TypeData, | ||
helperCtx:TypeContext, | ||
}) => void | { cursor?: TypePointCursor }; | ||
onClick?: (detail: { | ||
point: TypePoint, | ||
selectedElement: TypeElement<keyof TypeElemDesc> | null, | ||
data: TypeData, | ||
helperCtx:TypeContext | ||
}) => void; | ||
onMoveStart?: (detail: { | ||
point: TypePoint, | ||
selectedElement: TypeElement<keyof TypeElemDesc> | null, | ||
data: TypeData, | ||
helperCtx:TypeContext | ||
}) => void; | ||
onMove?: (detail: { | ||
point: TypePoint, | ||
selectedElement: TypeElement<keyof TypeElemDesc> | null, | ||
data: TypeData, | ||
helperCtx:TypeContext | ||
}) => void; | ||
onMoveEnd?: (detail: { | ||
point: TypePoint, | ||
selectedElement?: TypeElement<keyof TypeElemDesc> | null, | ||
data: TypeData, | ||
helperCtx:TypeContext | ||
}) => void; | ||
export type TypeHelperPluginEventResult = { | ||
cursor?: TypePointCursor, | ||
beController?: boolean; | ||
} | ||
export interface InterfaceHelperPlugin { | ||
readonly name?: string; | ||
readonly uuid?: string; | ||
onHover?: (detail: TypeHelperPluginEventDetail) => void | TypeHelperPluginEventResult; | ||
onPoint?: (detail: TypeHelperPluginEventDetail) => void | TypeHelperPluginEventResult; | ||
onClick?: (detail: TypeHelperPluginEventDetail) => void | TypeHelperPluginEventResult; | ||
onMoveStart?: (detail: TypeHelperPluginEventDetail) => void | TypeHelperPluginEventResult; | ||
onMove?: (detail: TypeHelperPluginEventDetail) => void | TypeHelperPluginEventResult; | ||
onMoveEnd?: (detail: TypeHelperPluginEventDetail) => void | TypeHelperPluginEventResult; | ||
} |
13923
443