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