File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -11,10 +11,12 @@ import type { createDragMoveHelper } from '../utils/dragMoveHelper'
1111import type SelectionArea from '@viselect/vanilla'
1212export { type MindElixirMethods } from '../methods'
1313
14- export enum DirectionClass {
15- LHS = 'lhs' ,
16- RHS = 'rhs' ,
17- }
14+ export const DirectionClass = {
15+ LHS : 'lhs' ,
16+ RHS : 'rhs' ,
17+ } as const
18+
19+ export type DirectionClass = ( typeof DirectionClass ) [ keyof typeof DirectionClass ]
1820
1921type Before = Partial < {
2022 [ K in Operations ] : ( ...args : Parameters < OperationMap [ K ] > ) => Promise < boolean > | boolean
@@ -91,7 +93,7 @@ export interface MindElixirInstance extends Omit<Required<Options>, 'markdown' |
9193 waitCopy : Topic [ ] | null
9294
9395 scaleVal : number
94- tempDirection : number | null
96+ tempDirection : 0 | 1 | 2 | null
9597
9698 container : HTMLElement
9799 map : HTMLElement
@@ -131,7 +133,7 @@ type PathString = string
131133 */
132134export interface Options {
133135 el : string | HTMLElement
134- direction ?: number
136+ direction ?: 0 | 1 | 2
135137 locale ?: Locale
136138 draggable ?: boolean
137139 editable ?: boolean
@@ -246,6 +248,6 @@ export type MindElixirData = {
246248 nodeData : NodeObj
247249 arrows ?: Arrow [ ]
248250 summaries ?: Summary [ ]
249- direction ?: number
251+ direction ?: 0 | 1 | 2
250252 theme ?: Theme
251253}
You can’t perform that action at this time.
0 commit comments