Skip to content

Commit

Permalink
chore: remove canvas event
Browse files Browse the repository at this point in the history
  • Loading branch information
paleface001 committed Nov 28, 2019
1 parent 496942b commit 99fa562
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions src/util/event.ts
Expand Up @@ -40,21 +40,10 @@ const EVENT_MAP: IEventmap = {
onLegendContextmenu: 'legend-item:contextmenu',
};

const CANVAS_EVENT_MAP: IEventmap = {
onCanvasClick: 'click',
onCanvasDblClick: 'dblclick',
onCanvasMousemove: 'mousemove',
onCanvasMousedown: 'mousedown',
onCanvasMouseup: 'mouseup',
onCanvasMouseenter: 'mouseenter',
onCanvasMouseleave: 'mouseleave',
onCanvasContextmenu: 'contextmenu',
};

type Handler = (...__: any[]) => {};

function onEvent(layer: ViewLayer, eventName: string, handler: Handler) {
layer.view.on(eventName, handler);
}

export { IEventmap, EVENT_MAP, CANVAS_EVENT_MAP, onEvent };
export { IEventmap, EVENT_MAP, onEvent };

0 comments on commit 99fa562

Please sign in to comment.