Cmen
3 years ago
9 changed files with 52 additions and 6 deletions
@ -1,8 +1,12 @@ |
|||||||
import { Dispatch } from "react"; |
import { Dispatch } from "react"; |
||||||
import { editorAction, IEditorState } from "@store"; |
import { editorAction, IEditorState } from "@store"; |
||||||
import { MapEditor } from "@map"; |
import { MapEditor } from "@map"; |
||||||
|
import { EventTypes } from "../../types/enum"; |
||||||
|
|
||||||
// 注册地图的事件钩子
|
// 注册地图的事件钩子
|
||||||
export function registerMapEventHooks(map: MapEditor, dispatch: Dispatch<any>) { |
export function registerMapEventHooks(map: MapEditor, dispatch: Dispatch<any>) { |
||||||
//
|
//
|
||||||
|
map.on(EventTypes.FinishCreateOverlay, (evt: any) => |
||||||
|
dispatch(editorAction.finishCreateOverlay(evt)) |
||||||
|
); |
||||||
} |
} |
||||||
|
Loading…
Reference in new issue