mirror of
https://gitee.com/antv/g6.git
synced 2024-12-04 12:49:04 +08:00
feat: add mobile event support
This commit is contained in:
parent
aa3d777b7e
commit
36c27ef4f4
@ -635,6 +635,11 @@ export enum G6Event {
|
||||
NODE_DRAGSTART = 'node:dragstart',
|
||||
NODE_DRAG = 'node:drag',
|
||||
NODE_DRAGEND = 'node:dragend',
|
||||
NODE_TAP = 'node:tap',
|
||||
NODE_PANSTART = 'node:panstart',
|
||||
NODE_PANMOVE = 'node:panmove',
|
||||
NODE_PANEND = 'node:panend',
|
||||
|
||||
// combo, extends from nodes
|
||||
COMBO_CONTEXTMENU = 'combo:contextmenu',
|
||||
COMBO_CLICK = 'combo:click',
|
||||
@ -653,6 +658,10 @@ export enum G6Event {
|
||||
COMBO_DRAGSTART = 'combo:dragstart',
|
||||
COMBO_DRAG = 'combo:drag',
|
||||
COMBO_DRAGEND = 'combo:dragend',
|
||||
COMBO_TAP = 'combo:tap',
|
||||
COMBO_PANSTART = 'combo:panstart',
|
||||
COMBO_PANMOVE = 'combo:panmove',
|
||||
COMBO_PANEND = 'combo:panend',
|
||||
|
||||
// edge events
|
||||
EDGE_CONTEXTMENU = 'edge:contextmenu',
|
||||
@ -687,6 +696,10 @@ export enum G6Event {
|
||||
CANVAS_DRAGSTART = 'canvas:dragstart',
|
||||
CANVAS_DRAG = 'canvas:drag',
|
||||
CANVAS_DRAGEND = 'canvas:dragend',
|
||||
CANVAS_TAP = 'canvas:tap',
|
||||
CANVAS_PANSTART = 'canvas:panstart',
|
||||
CANVAS_PANMOVE = 'canvas:panmove',
|
||||
CANVAS_PANEND = 'canvas:panend',
|
||||
|
||||
// timing events
|
||||
BEFORERENDER = 'beforerender',
|
||||
@ -730,6 +743,14 @@ export enum G6Event {
|
||||
VIEWPORTCHANGE = 'viewportchange',
|
||||
DRAGNODEEND = 'dragnodeend',
|
||||
STACKCHANGE = 'stackchange',
|
||||
|
||||
// Mobile event support
|
||||
TAP = 'tap',
|
||||
PINCHSTART = 'pinchstart',
|
||||
PINCHMOVE = 'pinchmove',
|
||||
PANSTART = 'panstart',
|
||||
PANMOVE = 'panmove',
|
||||
PANEND = 'panend',
|
||||
}
|
||||
|
||||
export type DefaultBehaviorType = IG6GraphEvent | string | number | object;
|
||||
|
Loading…
Reference in New Issue
Block a user