-
Notifications
You must be signed in to change notification settings - Fork 69
/
svg.select.js.d.ts
42 lines (38 loc) · 1.41 KB
/
svg.select.js.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import { SelectHandler, PointSelectHandler } from './src/svg.select.js'
interface SelectionOptions {
createHandle?: (el: Element) => Element
updateHandle?: (el: Element, point: number[]) => void
createRot?: (el: Element) => Element
updateRot?: (el: Element, rotPoint: number[], handlePoints: number[][]) => void
}
declare module '@svgdotjs/svg.js' {
interface Element {
select(): this
select(enable: boolean): this
select(options: SelectionOptions): this
select(handler: SelectHandler): this
select(attr?: SelectHandler | SelectionOptions | boolean): this
}
interface Polygon {
pointSelect(): this
pointSelect(enable: boolean): this
pointSelect(options: SelectionOptions): this
pointSelect(handler: PointSelectHandler): this
pointSelect(attr?: PointSelectHandler | SelectionOptions | boolean): this
}
interface Polyline {
pointSelect(): this
pointSelect(enable: boolean): this
pointSelect(options: SelectionOptions): this
pointSelect(handler: PointSelectHandler): this
pointSelect(attr?: PointSelectHandler | SelectionOptions | boolean): this
}
interface Line {
pointSelect(): this
pointSelect(enable: boolean): this
pointSelect(options: SelectionOptions): this
pointSelect(handler: PointSelectHandler): this
pointSelect(attr?: PointSelectHandler | SelectionOptions | boolean): this
}
}
export { SelectHandler, PointSelectHandler }