Skip to content

Commit

Permalink
fix(event): change point dom->target from canvas to body
Browse files Browse the repository at this point in the history
  • Loading branch information
yyc-git committed May 8, 2019
1 parent 0e03ac9 commit 688310b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
8 changes: 1 addition & 7 deletions src/job/utils/InitEventJobUtils.re
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,7 @@ open EventType;
let _getBody = () => DomExtend.document##body |> bodyToEventTarget;

let _fromPointDomEvent = (eventName, state) =>
WonderBsMost.Most.fromEvent(
eventName,
/* TODO add test */
/* ViewService.unsafeGetCanvas(state.viewRecord) |> canvasToEventTarget, */
_getBody(),
false,
);
WonderBsMost.Most.fromEvent(eventName, _getBody(), false);

let _fromKeyboardDomEvent = (eventName, state) =>
WonderBsMost.Most.fromEvent(eventName, _getBody(), false);
Expand Down
2 changes: 1 addition & 1 deletion test/unit/job/no_worker/tool/EventTool.re
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ let _extend = [%raw

let getBody = state => DomExtend.document##body |> EventType.bodyToEventTarget;

let getPointEventBindedDom = state => ViewTool.unsafeGetCanvas(state);
let getPointEventBindedDom = state => getBody(state);

let getKeyboardEventBindedDom = state => getBody(state);

Expand Down

0 comments on commit 688310b

Please sign in to comment.