@antv/g6-core
Advanced tools
Comparing version 0.6.3 to 0.6.4
@@ -50,3 +50,3 @@ var subjectColor = 'rgb(95, 149, 255)'; | ||
export default { | ||
version: '0.6.3', | ||
version: '0.6.4', | ||
rootContainerClassName: 'root-container', | ||
@@ -53,0 +53,0 @@ nodeContainerClassName: 'node-container', |
@@ -6,3 +6,3 @@ import EventEmitter from '@antv/event-emitter'; | ||
import { IEdge, INode, ICombo } from '../interface/item'; | ||
import { GraphAnimateConfig, GraphOptions, EdgeConfig, GraphData, Item, ITEM_TYPE, ModelConfig, NodeConfig, NodeMap, Padding, TreeGraphData, ComboConfig, ModeOption, ModeType, States, HullCfg, IG6GraphEvent, IPoint, FitViewRules } from '../types'; | ||
import { GraphAnimateConfig, GraphOptions, EdgeConfig, GraphData, Item, ITEM_TYPE, ModelConfig, NodeConfig, NodeMap, Padding, TreeGraphData, ComboConfig, ModeOption, ModeType, States, HullCfg, IG6GraphEvent, IPoint, FitViewRules, G6Event } from '../types'; | ||
import Hull from '../item/hull'; | ||
@@ -573,3 +573,3 @@ export interface PrivateGraphOption extends GraphOptions { | ||
*/ | ||
on<T = IG6GraphEvent>(eventName: string, callback: (e: T) => void, once?: boolean): this; | ||
on<T = IG6GraphEvent>(eventName: G6Event, callback: (e: T) => void, once?: boolean): this; | ||
/** | ||
@@ -576,0 +576,0 @@ * 销毁画布 |
@@ -503,2 +503,6 @@ import EventEmitter from '@antv/event-emitter'; | ||
/** | ||
* 移除指定的監聽函數 | ||
*/ | ||
off: <T = IG6GraphEvent>(eventName: string, callback: (e: T) => void, once?: boolean) => this; | ||
/** | ||
* 销毁画布 | ||
@@ -505,0 +509,0 @@ */ |
@@ -9,2 +9,31 @@ import { IGroup, Event as GraphEvent, BBox, AnimateCfg, ICanvas, IShape } from '@antv/g-base'; | ||
export declare type Item = INode | IEdge | ICombo; | ||
export declare type CommonInteractionEvent = 'click' | 'dblclick' | 'dragstart' | 'drag' | 'dragend' | 'dragenter' | 'dragleave' | 'dragover' | 'dragout' | 'drop' | 'focus' | 'blur' | 'keyup' | 'keydown' | 'mousedown' | 'mouseenter' | 'mouseup' | 'mousemove' | 'mouseout' | 'mouseover' | 'mouseleave' | 'touchstart' | 'touchmove' | 'touchend' | 'contextmenu' | 'wheel'; | ||
export declare type NodeInteractionEvent = 'click' | 'dblclick' | 'dragstart' | 'drag' | 'dragend' | 'dragenter' | 'dragleave' | 'dragover' | 'drop' | 'mousedown' | 'mouseenter' | 'mouseup' | 'mousemove' | 'mouseout' | 'mouseover' | 'mouseleave' | 'panestart' | 'panmove' | 'panend' | 'touchstart' | 'touchmove' | 'touchend' | 'contextmenu'; | ||
export declare type EdgeInteractionEvent = 'click' | 'dblclick' | 'dragstart' | 'drag' | 'dragend' | 'dragenter' | 'dragleave' | 'dragover' | 'mouseenter' | 'mousemove' | 'mouseout' | 'mouseover' | 'mouseleave' | 'mousedown' | 'mouseup' | 'touchstart' | 'touchmove' | 'touchend' | 'contextmenu'; | ||
export declare type ComboInteractionEvent = NodeInteractionEvent; | ||
export declare type CanvasInteractionEvent = 'click' | 'dblclick' | 'drag' | 'dragstart' | 'dragend' | 'dragenter' | 'dragleave' | 'drop' | 'keydown' | 'keyup' | 'mouseenter' | 'mousemove' | 'mouseout' | 'mouseover' | 'mouseleave' | 'mousedown' | 'mouseup' | 'touchstart' | 'touchmove' | 'touchend' | 'wheel' | 'contextmenu'; | ||
/** | ||
* @description | ||
* Canvas Intereaction events | ||
* | ||
* @example | ||
* English: https://g6.antv.vision/en/docs/api/Event | ||
* Chinese: https://g6.antv.vision/zh/docs/api/Event | ||
*/ | ||
export declare type GraphTimingEvents = 'beforerender' | 'afterrender' | 'beforeadditem' | 'afteradditem' | 'beforeremoveitem' | 'afterremoveitem' | 'beforeupdateitem' | 'afterupdateitem' | 'beforeitemvisibilitychange' | 'afteritemvisibilitychange' | 'beforeitemstatechange' | 'afteritemstatechange' | 'beforeitemrefresh' | 'afteritemrefresh' | 'beforeitemstatesclear' | 'afteritemstatesclear' | 'beforemodechange' | 'aftermodechange' | 'beforelayout' | 'afterlayout' | 'beforegraphrefreshposition' | 'aftergraphrefreshposition' | 'beforegraphrefresh' | 'aftergraphrefresh' | 'beforeanimate' | 'afteranimate' | 'beforecreateedge' | 'aftercreateedge' | 'beforecollapseexpandcombo' | 'aftercollapseexpandcombo' | 'graphstatechange' | 'afteractivaterelations' | 'nodeselectChange' | 'itemcollapsed' | 'tooltipchange' | 'wheelzoom' | 'viewportchange' | 'dragnodeend' | 'stackchange' | 'beforepaint' | 'afterpaint'; | ||
declare type MobileInteractionEvent = 'tap' | 'pinchstart' | 'pinmove' | 'panstart' | 'panmove' | 'panend'; | ||
export declare type NodeEventType = `node:${NodeInteractionEvent}`; | ||
export declare type EdgeEventType = `edge:${EdgeInteractionEvent}`; | ||
export declare type ComboEventType = `combo:${ComboInteractionEvent}`; | ||
export declare type CanvasEventType = `canvas:${CanvasInteractionEvent}`; | ||
export declare type GraphTimingEventType = GraphTimingEvents; | ||
export declare type MobileInteractionEventType = MobileInteractionEvent; | ||
/** | ||
* @description | ||
* Graph interaction events | ||
* | ||
* @example | ||
* https://g6.antv.vision/en/docs/api/Event#combo-interaction-event | ||
*/ | ||
export declare type G6Event = NodeEventType | EdgeEventType | ComboEventType | CanvasEventType | GraphTimingEventType | MobileInteractionEventType | CommonInteractionEvent | CommonInteractionEvent; | ||
export interface IG6GraphEvent extends GraphEvent { | ||
@@ -108,2 +137,3 @@ item: Item | null; | ||
} | ||
export declare type ZoomKeyType = 'shift' | 'ctrl' | 'alt' | 'control' | 'meta'; | ||
export interface ModeOption { | ||
@@ -146,3 +176,3 @@ type: string; | ||
brushStyle?: object; | ||
zoomKey?: 'shift' | 'ctrl' | 'alt' | 'control'; | ||
zoomKey?: ZoomKeyType | ZoomKeyType[]; | ||
shouldUpdate?: (e: IG6GraphEvent) => boolean; | ||
@@ -487,164 +517,2 @@ shouldBegin?: (e: IG6GraphEvent) => boolean; | ||
} | ||
export declare enum G6Event { | ||
CLICK = "click", | ||
DBLCLICK = "dblclick", | ||
MOUSEDOWN = "mousedown", | ||
MOUDEUP = "mouseup", | ||
CONTEXTMENU = "contextmenu", | ||
MOUSEENTER = "mouseenter", | ||
MOUSEOUT = "mouseout", | ||
MOUSEOVER = "mouseover", | ||
MOUSEMOVE = "mousemove", | ||
MOUSELEAVE = "mouseleave", | ||
DRAGSTART = "dragstart", | ||
DRAGEND = "dragend", | ||
DRAG = "drag", | ||
DRAGENTER = "dragenter", | ||
DRAGLEAVE = "dragleave", | ||
DRAGOVER = "dragover", | ||
DRAGOUT = "dragout", | ||
DDROP = "drop", | ||
KEYUP = "keyup", | ||
KEYDOWN = "keydown", | ||
WHEEL = "wheel", | ||
FOCUS = "focus", | ||
BLUR = "blur", | ||
TOUCHSTART = "touchstart", | ||
TOUCHMOVE = "touchmove", | ||
TOUCHEND = "touchend", | ||
CANVAS_TOUCHSTART = "canvas:touchstart", | ||
CANVAS_TOUCHMOVE = "canvas:touchmove", | ||
CANVAS_TOUCHEND = "canvas:touchend", | ||
NODE_TOUCHSTART = "node:touchstart", | ||
NODE_TOUCHMOVE = "node:touchmove", | ||
NODE_TOUCHEND = "node:touchend", | ||
COMBO_TOUCHSTART = "combo:touchstart", | ||
COMBO_TOUCHMOVE = "combo:touchmove", | ||
COMBO_TOUCHEND = "combo:touchend", | ||
EDGE_TOUCHSTART = "edge:touchstart", | ||
EDGE_TOUCHMOVE = "edge:touchmove", | ||
EDGE_TOUCHEND = "edge:touchend", | ||
NODE_CONTEXTMENU = "node:contextmenu", | ||
NODE_CLICK = "node:click", | ||
NODE_DBLCLICK = "node:dblclick", | ||
NODE_MOUSEDOWN = "node:mousedown", | ||
NODE_MOUSEUP = "node:mouseup", | ||
NODE_MOUSEENTER = "node:mouseenter", | ||
NODE_MOUSELEAVE = "node:mouseleave", | ||
NODE_MOUSEMOVE = "node:mousemove", | ||
NODE_MOUSEOUT = "node:mouseout", | ||
NODE_MOUSEOVER = "node:mouseover", | ||
NODE_DROP = "node:drop", | ||
NODE_DRAGOVER = "node:dragover", | ||
NODE_DRAGENTER = "node:dragenter", | ||
NODE_DRAGLEAVE = "node:dragleave", | ||
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_CONTEXTMENU = "combo:contextmenu", | ||
COMBO_CLICK = "combo:click", | ||
COMBO_DBLCLICK = "combo:dblclick", | ||
COMBO_MOUSEDOWN = "combo:mousedown", | ||
COMBO_MOUSEUP = "combo:mouseup", | ||
COMBO_MOUSEENTER = "combo:mouseenter", | ||
COMBO_MOUSELEAVE = "combo:mouseleave", | ||
COMBO_MOUSEMOVE = "combo:mousemove", | ||
COMBO_MOUSEOUT = "combo:mouseout", | ||
COMBO_MOUSEOVER = "combo:mouseover", | ||
COMBO_DROP = "combo:drop", | ||
COMBO_DRAGOVER = "combo:dragover", | ||
COMBO_DRAGENTER = "combo:dragenter", | ||
COMBO_DRAGLEAVE = "combo:dragleave", | ||
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_CONTEXTMENU = "edge:contextmenu", | ||
EDGE_CLICK = "edge:click", | ||
EDGE_DBLCLICK = "edge:dblclick", | ||
EDGE_MOUSEDOWN = "edge:mousedown", | ||
EDGE_MOUSEUP = "edge:mouseup", | ||
EDGE_MOUSEENTER = "edge:mouseenter", | ||
EDGE_MOUSELEAVE = "edge:mouseleave", | ||
EDGE_MOUSEMOVE = "edge:mousemove", | ||
EDGE_MOUSEOUT = "edge:mouseout", | ||
EDGE_MOUSEOVER = "edge:mouseover", | ||
EDGE_DROP = "edge:drop", | ||
EDGE_DRAGOVER = "edge:dragover", | ||
EDGE_DRAGENTER = "edge:dragenter", | ||
EDGE_DRAGLEAVE = "edge:dragleave", | ||
CANVAS_CONTEXTMENU = "canvas:contextmenu", | ||
CANVAS_CLICK = "canvas:click", | ||
CANVAS_DBLCLICK = "canvas:dblclick", | ||
CANVAS_MOUSEDOWN = "canvas:mousedown", | ||
CANVAS_MOUSEUP = "canvas:mouseup", | ||
CANVAS_MOUSEENTER = "canvas:mouseenter", | ||
CANVAS_MOUSELEAVE = "canvas:mouseleave", | ||
CANVAS_MOUSEMOVE = "canvas:mousemove", | ||
CANVAS_MOUSEOUT = "canvas:mouseout", | ||
CANVAS_MOUSEOVER = "canvas:mouseover", | ||
CANVAS_DROP = "canvas:drop", | ||
CANVAS_DRAGENTER = "canvas:dragenter", | ||
CANVAS_DRAGLEAVE = "canvas:dragleave", | ||
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", | ||
BEFORERENDER = "beforerender", | ||
AFTERRENDER = "afterrender", | ||
BEFOREADDITEM = "beforeadditem", | ||
AFTERADDITEM = "afteradditem", | ||
BEFOREREMOVEITEM = "beforeremoveitem", | ||
AFTERREMOVEITEM = "afterremoveitem", | ||
BEFOREUPDATEITEM = "beforeupdateitem", | ||
AFTERUPDATEITEM = "afterupdateitem", | ||
BEFOREITEMVISIBILITYCHANGE = "beforeitemvisibilitychange", | ||
AFTERITEMVISIBILITYCHANGE = "afteritemvisibilitychange", | ||
BEFOREITEMSTATECHANGE = "beforeitemstatechange", | ||
AFTERITEMSTATECHANGE = "afteritemstatechange", | ||
BEFOREITEMREFRESH = "beforeitemrefresh", | ||
AFTERITEMREFRESH = "afteritemrefresh", | ||
BEFOREITEMSTATESCLEAR = "beforeitemstatesclear", | ||
AFTERITEMSTATESCLEAR = "afteritemstatesclear", | ||
BEFOREMODECHANGE = "beforemodechange", | ||
AFTERMODECHANGE = "aftermodechange", | ||
BEFORELAYOUT = "beforelayout", | ||
AFTERLAYOUT = "afterlayout", | ||
BEFORECREATEEDGE = "beforecreateedge", | ||
AFTERCREATEEDGE = "aftercreateedge", | ||
BEFOREGRAPHREFRESHPOSITION = "beforegraphrefreshposition", | ||
AFTERGRAPHREFRESHPOSITION = "aftergraphrefreshposition", | ||
BEFOREGRAPHREFRESH = "beforegraphrefresh", | ||
AFTERGRAPHREFRESH = "aftergraphrefresh", | ||
BEFOREANIMATE = "beforeanimate", | ||
AFTERANIMATE = "afteranimate", | ||
BEFOREPAINT = "beforepaint", | ||
AFTERPAINT = "afterpaint", | ||
BEFORECOLLAPSEEXPANDCOMBO = "beforecollapseexpandcombo", | ||
AFTERCOLLAPSEEXPANDCOMBO = "aftercollapseexpandcombo", | ||
GRAPHSTATECHANGE = "graphstatechange", | ||
AFTERACTIVATERELATIONS = "afteractivaterelations", | ||
NODESELECTCHANGE = "nodeselectchange", | ||
TOOLTIPCHANGE = "tooltipchange", | ||
WHEELZOOM = "wheelzoom", | ||
VIEWPORTCHANGE = "viewportchange", | ||
DRAGNODEEND = "dragnodeend", | ||
STACKCHANGE = "stackchange", | ||
TAP = "tap", | ||
PINCHSTART = "pinchstart", | ||
PINCHMOVE = "pinchmove", | ||
PANSTART = "panstart", | ||
PANMOVE = "panmove", | ||
PANEND = "panend" | ||
} | ||
export declare type DefaultBehaviorType = IG6GraphEvent | string | number | object; | ||
@@ -651,0 +519,0 @@ export interface BehaviorOption { |
@@ -1,174 +0,1 @@ | ||
export * from '../interface'; // Behavior type file | ||
export var G6Event; | ||
(function (G6Event) { | ||
// common events | ||
G6Event["CLICK"] = "click"; | ||
G6Event["DBLCLICK"] = "dblclick"; | ||
G6Event["MOUSEDOWN"] = "mousedown"; | ||
G6Event["MOUDEUP"] = "mouseup"; | ||
G6Event["CONTEXTMENU"] = "contextmenu"; | ||
G6Event["MOUSEENTER"] = "mouseenter"; | ||
G6Event["MOUSEOUT"] = "mouseout"; | ||
G6Event["MOUSEOVER"] = "mouseover"; | ||
G6Event["MOUSEMOVE"] = "mousemove"; | ||
G6Event["MOUSELEAVE"] = "mouseleave"; | ||
G6Event["DRAGSTART"] = "dragstart"; | ||
G6Event["DRAGEND"] = "dragend"; | ||
G6Event["DRAG"] = "drag"; | ||
G6Event["DRAGENTER"] = "dragenter"; | ||
G6Event["DRAGLEAVE"] = "dragleave"; | ||
G6Event["DRAGOVER"] = "dragover"; | ||
G6Event["DRAGOUT"] = "dragout"; | ||
G6Event["DDROP"] = "drop"; | ||
G6Event["KEYUP"] = "keyup"; | ||
G6Event["KEYDOWN"] = "keydown"; | ||
G6Event["WHEEL"] = "wheel"; | ||
G6Event["FOCUS"] = "focus"; | ||
G6Event["BLUR"] = "blur"; // touch events | ||
G6Event["TOUCHSTART"] = "touchstart"; | ||
G6Event["TOUCHMOVE"] = "touchmove"; | ||
G6Event["TOUCHEND"] = "touchend"; | ||
G6Event["CANVAS_TOUCHSTART"] = "canvas:touchstart"; | ||
G6Event["CANVAS_TOUCHMOVE"] = "canvas:touchmove"; | ||
G6Event["CANVAS_TOUCHEND"] = "canvas:touchend"; | ||
G6Event["NODE_TOUCHSTART"] = "node:touchstart"; | ||
G6Event["NODE_TOUCHMOVE"] = "node:touchmove"; | ||
G6Event["NODE_TOUCHEND"] = "node:touchend"; | ||
G6Event["COMBO_TOUCHSTART"] = "combo:touchstart"; | ||
G6Event["COMBO_TOUCHMOVE"] = "combo:touchmove"; | ||
G6Event["COMBO_TOUCHEND"] = "combo:touchend"; | ||
G6Event["EDGE_TOUCHSTART"] = "edge:touchstart"; | ||
G6Event["EDGE_TOUCHMOVE"] = "edge:touchmove"; | ||
G6Event["EDGE_TOUCHEND"] = "edge:touchend"; // node events | ||
G6Event["NODE_CONTEXTMENU"] = "node:contextmenu"; | ||
G6Event["NODE_CLICK"] = "node:click"; | ||
G6Event["NODE_DBLCLICK"] = "node:dblclick"; | ||
G6Event["NODE_MOUSEDOWN"] = "node:mousedown"; | ||
G6Event["NODE_MOUSEUP"] = "node:mouseup"; | ||
G6Event["NODE_MOUSEENTER"] = "node:mouseenter"; | ||
G6Event["NODE_MOUSELEAVE"] = "node:mouseleave"; | ||
G6Event["NODE_MOUSEMOVE"] = "node:mousemove"; | ||
G6Event["NODE_MOUSEOUT"] = "node:mouseout"; | ||
G6Event["NODE_MOUSEOVER"] = "node:mouseover"; | ||
G6Event["NODE_DROP"] = "node:drop"; | ||
G6Event["NODE_DRAGOVER"] = "node:dragover"; | ||
G6Event["NODE_DRAGENTER"] = "node:dragenter"; | ||
G6Event["NODE_DRAGLEAVE"] = "node:dragleave"; | ||
G6Event["NODE_DRAGSTART"] = "node:dragstart"; | ||
G6Event["NODE_DRAG"] = "node:drag"; | ||
G6Event["NODE_DRAGEND"] = "node:dragend"; | ||
G6Event["NODE_TAP"] = "node:tap"; | ||
G6Event["NODE_PANSTART"] = "node:panstart"; | ||
G6Event["NODE_PANMOVE"] = "node:panmove"; | ||
G6Event["NODE_PANEND"] = "node:panend"; // combo, extends from nodes | ||
G6Event["COMBO_CONTEXTMENU"] = "combo:contextmenu"; | ||
G6Event["COMBO_CLICK"] = "combo:click"; | ||
G6Event["COMBO_DBLCLICK"] = "combo:dblclick"; | ||
G6Event["COMBO_MOUSEDOWN"] = "combo:mousedown"; | ||
G6Event["COMBO_MOUSEUP"] = "combo:mouseup"; | ||
G6Event["COMBO_MOUSEENTER"] = "combo:mouseenter"; | ||
G6Event["COMBO_MOUSELEAVE"] = "combo:mouseleave"; | ||
G6Event["COMBO_MOUSEMOVE"] = "combo:mousemove"; | ||
G6Event["COMBO_MOUSEOUT"] = "combo:mouseout"; | ||
G6Event["COMBO_MOUSEOVER"] = "combo:mouseover"; | ||
G6Event["COMBO_DROP"] = "combo:drop"; | ||
G6Event["COMBO_DRAGOVER"] = "combo:dragover"; | ||
G6Event["COMBO_DRAGENTER"] = "combo:dragenter"; | ||
G6Event["COMBO_DRAGLEAVE"] = "combo:dragleave"; | ||
G6Event["COMBO_DRAGSTART"] = "combo:dragstart"; | ||
G6Event["COMBO_DRAG"] = "combo:drag"; | ||
G6Event["COMBO_DRAGEND"] = "combo:dragend"; | ||
G6Event["COMBO_TAP"] = "combo:tap"; | ||
G6Event["COMBO_PANSTART"] = "combo:panstart"; | ||
G6Event["COMBO_PANMOVE"] = "combo:panmove"; | ||
G6Event["COMBO_PANEND"] = "combo:panend"; // edge events | ||
G6Event["EDGE_CONTEXTMENU"] = "edge:contextmenu"; | ||
G6Event["EDGE_CLICK"] = "edge:click"; | ||
G6Event["EDGE_DBLCLICK"] = "edge:dblclick"; | ||
G6Event["EDGE_MOUSEDOWN"] = "edge:mousedown"; | ||
G6Event["EDGE_MOUSEUP"] = "edge:mouseup"; | ||
G6Event["EDGE_MOUSEENTER"] = "edge:mouseenter"; | ||
G6Event["EDGE_MOUSELEAVE"] = "edge:mouseleave"; | ||
G6Event["EDGE_MOUSEMOVE"] = "edge:mousemove"; | ||
G6Event["EDGE_MOUSEOUT"] = "edge:mouseout"; | ||
G6Event["EDGE_MOUSEOVER"] = "edge:mouseover"; | ||
G6Event["EDGE_DROP"] = "edge:drop"; | ||
G6Event["EDGE_DRAGOVER"] = "edge:dragover"; | ||
G6Event["EDGE_DRAGENTER"] = "edge:dragenter"; | ||
G6Event["EDGE_DRAGLEAVE"] = "edge:dragleave"; // canvas events | ||
G6Event["CANVAS_CONTEXTMENU"] = "canvas:contextmenu"; | ||
G6Event["CANVAS_CLICK"] = "canvas:click"; | ||
G6Event["CANVAS_DBLCLICK"] = "canvas:dblclick"; | ||
G6Event["CANVAS_MOUSEDOWN"] = "canvas:mousedown"; | ||
G6Event["CANVAS_MOUSEUP"] = "canvas:mouseup"; | ||
G6Event["CANVAS_MOUSEENTER"] = "canvas:mouseenter"; | ||
G6Event["CANVAS_MOUSELEAVE"] = "canvas:mouseleave"; | ||
G6Event["CANVAS_MOUSEMOVE"] = "canvas:mousemove"; | ||
G6Event["CANVAS_MOUSEOUT"] = "canvas:mouseout"; | ||
G6Event["CANVAS_MOUSEOVER"] = "canvas:mouseover"; | ||
G6Event["CANVAS_DROP"] = "canvas:drop"; | ||
G6Event["CANVAS_DRAGENTER"] = "canvas:dragenter"; | ||
G6Event["CANVAS_DRAGLEAVE"] = "canvas:dragleave"; | ||
G6Event["CANVAS_DRAGSTART"] = "canvas:dragstart"; | ||
G6Event["CANVAS_DRAG"] = "canvas:drag"; | ||
G6Event["CANVAS_DRAGEND"] = "canvas:dragend"; | ||
G6Event["CANVAS_TAP"] = "canvas:tap"; | ||
G6Event["CANVAS_PANSTART"] = "canvas:panstart"; | ||
G6Event["CANVAS_PANMOVE"] = "canvas:panmove"; | ||
G6Event["CANVAS_PANEND"] = "canvas:panend"; // timing events | ||
G6Event["BEFORERENDER"] = "beforerender"; | ||
G6Event["AFTERRENDER"] = "afterrender"; | ||
G6Event["BEFOREADDITEM"] = "beforeadditem"; | ||
G6Event["AFTERADDITEM"] = "afteradditem"; | ||
G6Event["BEFOREREMOVEITEM"] = "beforeremoveitem"; | ||
G6Event["AFTERREMOVEITEM"] = "afterremoveitem"; | ||
G6Event["BEFOREUPDATEITEM"] = "beforeupdateitem"; | ||
G6Event["AFTERUPDATEITEM"] = "afterupdateitem"; | ||
G6Event["BEFOREITEMVISIBILITYCHANGE"] = "beforeitemvisibilitychange"; | ||
G6Event["AFTERITEMVISIBILITYCHANGE"] = "afteritemvisibilitychange"; | ||
G6Event["BEFOREITEMSTATECHANGE"] = "beforeitemstatechange"; | ||
G6Event["AFTERITEMSTATECHANGE"] = "afteritemstatechange"; | ||
G6Event["BEFOREITEMREFRESH"] = "beforeitemrefresh"; | ||
G6Event["AFTERITEMREFRESH"] = "afteritemrefresh"; | ||
G6Event["BEFOREITEMSTATESCLEAR"] = "beforeitemstatesclear"; | ||
G6Event["AFTERITEMSTATESCLEAR"] = "afteritemstatesclear"; | ||
G6Event["BEFOREMODECHANGE"] = "beforemodechange"; | ||
G6Event["AFTERMODECHANGE"] = "aftermodechange"; | ||
G6Event["BEFORELAYOUT"] = "beforelayout"; | ||
G6Event["AFTERLAYOUT"] = "afterlayout"; | ||
G6Event["BEFORECREATEEDGE"] = "beforecreateedge"; | ||
G6Event["AFTERCREATEEDGE"] = "aftercreateedge"; | ||
G6Event["BEFOREGRAPHREFRESHPOSITION"] = "beforegraphrefreshposition"; | ||
G6Event["AFTERGRAPHREFRESHPOSITION"] = "aftergraphrefreshposition"; | ||
G6Event["BEFOREGRAPHREFRESH"] = "beforegraphrefresh"; | ||
G6Event["AFTERGRAPHREFRESH"] = "aftergraphrefresh"; | ||
G6Event["BEFOREANIMATE"] = "beforeanimate"; | ||
G6Event["AFTERANIMATE"] = "afteranimate"; | ||
G6Event["BEFOREPAINT"] = "beforepaint"; | ||
G6Event["AFTERPAINT"] = "afterpaint"; | ||
G6Event["BEFORECOLLAPSEEXPANDCOMBO"] = "beforecollapseexpandcombo"; | ||
G6Event["AFTERCOLLAPSEEXPANDCOMBO"] = "aftercollapseexpandcombo"; | ||
G6Event["GRAPHSTATECHANGE"] = "graphstatechange"; | ||
G6Event["AFTERACTIVATERELATIONS"] = "afteractivaterelations"; | ||
G6Event["NODESELECTCHANGE"] = "nodeselectchange"; | ||
G6Event["TOOLTIPCHANGE"] = "tooltipchange"; | ||
G6Event["WHEELZOOM"] = "wheelzoom"; | ||
G6Event["VIEWPORTCHANGE"] = "viewportchange"; | ||
G6Event["DRAGNODEEND"] = "dragnodeend"; | ||
G6Event["STACKCHANGE"] = "stackchange"; // Mobile event support | ||
G6Event["TAP"] = "tap"; | ||
G6Event["PINCHSTART"] = "pinchstart"; | ||
G6Event["PINCHMOVE"] = "pinchmove"; | ||
G6Event["PANSTART"] = "panstart"; | ||
G6Event["PANMOVE"] = "panmove"; | ||
G6Event["PANEND"] = "panend"; | ||
})(G6Event || (G6Event = {})); | ||
export * from '../interface'; |
@@ -56,3 +56,3 @@ "use strict"; | ||
var _default = { | ||
version: '0.6.3', | ||
version: '0.6.4', | ||
rootContainerClassName: 'root-container', | ||
@@ -59,0 +59,0 @@ nodeContainerClassName: 'node-container', |
@@ -6,3 +6,3 @@ import EventEmitter from '@antv/event-emitter'; | ||
import { IEdge, INode, ICombo } from '../interface/item'; | ||
import { GraphAnimateConfig, GraphOptions, EdgeConfig, GraphData, Item, ITEM_TYPE, ModelConfig, NodeConfig, NodeMap, Padding, TreeGraphData, ComboConfig, ModeOption, ModeType, States, HullCfg, IG6GraphEvent, IPoint, FitViewRules } from '../types'; | ||
import { GraphAnimateConfig, GraphOptions, EdgeConfig, GraphData, Item, ITEM_TYPE, ModelConfig, NodeConfig, NodeMap, Padding, TreeGraphData, ComboConfig, ModeOption, ModeType, States, HullCfg, IG6GraphEvent, IPoint, FitViewRules, G6Event } from '../types'; | ||
import Hull from '../item/hull'; | ||
@@ -573,3 +573,3 @@ export interface PrivateGraphOption extends GraphOptions { | ||
*/ | ||
on<T = IG6GraphEvent>(eventName: string, callback: (e: T) => void, once?: boolean): this; | ||
on<T = IG6GraphEvent>(eventName: G6Event, callback: (e: T) => void, once?: boolean): this; | ||
/** | ||
@@ -576,0 +576,0 @@ * 销毁画布 |
@@ -503,2 +503,6 @@ import EventEmitter from '@antv/event-emitter'; | ||
/** | ||
* 移除指定的監聽函數 | ||
*/ | ||
off: <T = IG6GraphEvent>(eventName: string, callback: (e: T) => void, once?: boolean) => this; | ||
/** | ||
* 销毁画布 | ||
@@ -505,0 +509,0 @@ */ |
@@ -9,2 +9,31 @@ import { IGroup, Event as GraphEvent, BBox, AnimateCfg, ICanvas, IShape } from '@antv/g-base'; | ||
export declare type Item = INode | IEdge | ICombo; | ||
export declare type CommonInteractionEvent = 'click' | 'dblclick' | 'dragstart' | 'drag' | 'dragend' | 'dragenter' | 'dragleave' | 'dragover' | 'dragout' | 'drop' | 'focus' | 'blur' | 'keyup' | 'keydown' | 'mousedown' | 'mouseenter' | 'mouseup' | 'mousemove' | 'mouseout' | 'mouseover' | 'mouseleave' | 'touchstart' | 'touchmove' | 'touchend' | 'contextmenu' | 'wheel'; | ||
export declare type NodeInteractionEvent = 'click' | 'dblclick' | 'dragstart' | 'drag' | 'dragend' | 'dragenter' | 'dragleave' | 'dragover' | 'drop' | 'mousedown' | 'mouseenter' | 'mouseup' | 'mousemove' | 'mouseout' | 'mouseover' | 'mouseleave' | 'panestart' | 'panmove' | 'panend' | 'touchstart' | 'touchmove' | 'touchend' | 'contextmenu'; | ||
export declare type EdgeInteractionEvent = 'click' | 'dblclick' | 'dragstart' | 'drag' | 'dragend' | 'dragenter' | 'dragleave' | 'dragover' | 'mouseenter' | 'mousemove' | 'mouseout' | 'mouseover' | 'mouseleave' | 'mousedown' | 'mouseup' | 'touchstart' | 'touchmove' | 'touchend' | 'contextmenu'; | ||
export declare type ComboInteractionEvent = NodeInteractionEvent; | ||
export declare type CanvasInteractionEvent = 'click' | 'dblclick' | 'drag' | 'dragstart' | 'dragend' | 'dragenter' | 'dragleave' | 'drop' | 'keydown' | 'keyup' | 'mouseenter' | 'mousemove' | 'mouseout' | 'mouseover' | 'mouseleave' | 'mousedown' | 'mouseup' | 'touchstart' | 'touchmove' | 'touchend' | 'wheel' | 'contextmenu'; | ||
/** | ||
* @description | ||
* Canvas Intereaction events | ||
* | ||
* @example | ||
* English: https://g6.antv.vision/en/docs/api/Event | ||
* Chinese: https://g6.antv.vision/zh/docs/api/Event | ||
*/ | ||
export declare type GraphTimingEvents = 'beforerender' | 'afterrender' | 'beforeadditem' | 'afteradditem' | 'beforeremoveitem' | 'afterremoveitem' | 'beforeupdateitem' | 'afterupdateitem' | 'beforeitemvisibilitychange' | 'afteritemvisibilitychange' | 'beforeitemstatechange' | 'afteritemstatechange' | 'beforeitemrefresh' | 'afteritemrefresh' | 'beforeitemstatesclear' | 'afteritemstatesclear' | 'beforemodechange' | 'aftermodechange' | 'beforelayout' | 'afterlayout' | 'beforegraphrefreshposition' | 'aftergraphrefreshposition' | 'beforegraphrefresh' | 'aftergraphrefresh' | 'beforeanimate' | 'afteranimate' | 'beforecreateedge' | 'aftercreateedge' | 'beforecollapseexpandcombo' | 'aftercollapseexpandcombo' | 'graphstatechange' | 'afteractivaterelations' | 'nodeselectChange' | 'itemcollapsed' | 'tooltipchange' | 'wheelzoom' | 'viewportchange' | 'dragnodeend' | 'stackchange' | 'beforepaint' | 'afterpaint'; | ||
declare type MobileInteractionEvent = 'tap' | 'pinchstart' | 'pinmove' | 'panstart' | 'panmove' | 'panend'; | ||
export declare type NodeEventType = `node:${NodeInteractionEvent}`; | ||
export declare type EdgeEventType = `edge:${EdgeInteractionEvent}`; | ||
export declare type ComboEventType = `combo:${ComboInteractionEvent}`; | ||
export declare type CanvasEventType = `canvas:${CanvasInteractionEvent}`; | ||
export declare type GraphTimingEventType = GraphTimingEvents; | ||
export declare type MobileInteractionEventType = MobileInteractionEvent; | ||
/** | ||
* @description | ||
* Graph interaction events | ||
* | ||
* @example | ||
* https://g6.antv.vision/en/docs/api/Event#combo-interaction-event | ||
*/ | ||
export declare type G6Event = NodeEventType | EdgeEventType | ComboEventType | CanvasEventType | GraphTimingEventType | MobileInteractionEventType | CommonInteractionEvent | CommonInteractionEvent; | ||
export interface IG6GraphEvent extends GraphEvent { | ||
@@ -108,2 +137,3 @@ item: Item | null; | ||
} | ||
export declare type ZoomKeyType = 'shift' | 'ctrl' | 'alt' | 'control' | 'meta'; | ||
export interface ModeOption { | ||
@@ -146,3 +176,3 @@ type: string; | ||
brushStyle?: object; | ||
zoomKey?: 'shift' | 'ctrl' | 'alt' | 'control'; | ||
zoomKey?: ZoomKeyType | ZoomKeyType[]; | ||
shouldUpdate?: (e: IG6GraphEvent) => boolean; | ||
@@ -487,164 +517,2 @@ shouldBegin?: (e: IG6GraphEvent) => boolean; | ||
} | ||
export declare enum G6Event { | ||
CLICK = "click", | ||
DBLCLICK = "dblclick", | ||
MOUSEDOWN = "mousedown", | ||
MOUDEUP = "mouseup", | ||
CONTEXTMENU = "contextmenu", | ||
MOUSEENTER = "mouseenter", | ||
MOUSEOUT = "mouseout", | ||
MOUSEOVER = "mouseover", | ||
MOUSEMOVE = "mousemove", | ||
MOUSELEAVE = "mouseleave", | ||
DRAGSTART = "dragstart", | ||
DRAGEND = "dragend", | ||
DRAG = "drag", | ||
DRAGENTER = "dragenter", | ||
DRAGLEAVE = "dragleave", | ||
DRAGOVER = "dragover", | ||
DRAGOUT = "dragout", | ||
DDROP = "drop", | ||
KEYUP = "keyup", | ||
KEYDOWN = "keydown", | ||
WHEEL = "wheel", | ||
FOCUS = "focus", | ||
BLUR = "blur", | ||
TOUCHSTART = "touchstart", | ||
TOUCHMOVE = "touchmove", | ||
TOUCHEND = "touchend", | ||
CANVAS_TOUCHSTART = "canvas:touchstart", | ||
CANVAS_TOUCHMOVE = "canvas:touchmove", | ||
CANVAS_TOUCHEND = "canvas:touchend", | ||
NODE_TOUCHSTART = "node:touchstart", | ||
NODE_TOUCHMOVE = "node:touchmove", | ||
NODE_TOUCHEND = "node:touchend", | ||
COMBO_TOUCHSTART = "combo:touchstart", | ||
COMBO_TOUCHMOVE = "combo:touchmove", | ||
COMBO_TOUCHEND = "combo:touchend", | ||
EDGE_TOUCHSTART = "edge:touchstart", | ||
EDGE_TOUCHMOVE = "edge:touchmove", | ||
EDGE_TOUCHEND = "edge:touchend", | ||
NODE_CONTEXTMENU = "node:contextmenu", | ||
NODE_CLICK = "node:click", | ||
NODE_DBLCLICK = "node:dblclick", | ||
NODE_MOUSEDOWN = "node:mousedown", | ||
NODE_MOUSEUP = "node:mouseup", | ||
NODE_MOUSEENTER = "node:mouseenter", | ||
NODE_MOUSELEAVE = "node:mouseleave", | ||
NODE_MOUSEMOVE = "node:mousemove", | ||
NODE_MOUSEOUT = "node:mouseout", | ||
NODE_MOUSEOVER = "node:mouseover", | ||
NODE_DROP = "node:drop", | ||
NODE_DRAGOVER = "node:dragover", | ||
NODE_DRAGENTER = "node:dragenter", | ||
NODE_DRAGLEAVE = "node:dragleave", | ||
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_CONTEXTMENU = "combo:contextmenu", | ||
COMBO_CLICK = "combo:click", | ||
COMBO_DBLCLICK = "combo:dblclick", | ||
COMBO_MOUSEDOWN = "combo:mousedown", | ||
COMBO_MOUSEUP = "combo:mouseup", | ||
COMBO_MOUSEENTER = "combo:mouseenter", | ||
COMBO_MOUSELEAVE = "combo:mouseleave", | ||
COMBO_MOUSEMOVE = "combo:mousemove", | ||
COMBO_MOUSEOUT = "combo:mouseout", | ||
COMBO_MOUSEOVER = "combo:mouseover", | ||
COMBO_DROP = "combo:drop", | ||
COMBO_DRAGOVER = "combo:dragover", | ||
COMBO_DRAGENTER = "combo:dragenter", | ||
COMBO_DRAGLEAVE = "combo:dragleave", | ||
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_CONTEXTMENU = "edge:contextmenu", | ||
EDGE_CLICK = "edge:click", | ||
EDGE_DBLCLICK = "edge:dblclick", | ||
EDGE_MOUSEDOWN = "edge:mousedown", | ||
EDGE_MOUSEUP = "edge:mouseup", | ||
EDGE_MOUSEENTER = "edge:mouseenter", | ||
EDGE_MOUSELEAVE = "edge:mouseleave", | ||
EDGE_MOUSEMOVE = "edge:mousemove", | ||
EDGE_MOUSEOUT = "edge:mouseout", | ||
EDGE_MOUSEOVER = "edge:mouseover", | ||
EDGE_DROP = "edge:drop", | ||
EDGE_DRAGOVER = "edge:dragover", | ||
EDGE_DRAGENTER = "edge:dragenter", | ||
EDGE_DRAGLEAVE = "edge:dragleave", | ||
CANVAS_CONTEXTMENU = "canvas:contextmenu", | ||
CANVAS_CLICK = "canvas:click", | ||
CANVAS_DBLCLICK = "canvas:dblclick", | ||
CANVAS_MOUSEDOWN = "canvas:mousedown", | ||
CANVAS_MOUSEUP = "canvas:mouseup", | ||
CANVAS_MOUSEENTER = "canvas:mouseenter", | ||
CANVAS_MOUSELEAVE = "canvas:mouseleave", | ||
CANVAS_MOUSEMOVE = "canvas:mousemove", | ||
CANVAS_MOUSEOUT = "canvas:mouseout", | ||
CANVAS_MOUSEOVER = "canvas:mouseover", | ||
CANVAS_DROP = "canvas:drop", | ||
CANVAS_DRAGENTER = "canvas:dragenter", | ||
CANVAS_DRAGLEAVE = "canvas:dragleave", | ||
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", | ||
BEFORERENDER = "beforerender", | ||
AFTERRENDER = "afterrender", | ||
BEFOREADDITEM = "beforeadditem", | ||
AFTERADDITEM = "afteradditem", | ||
BEFOREREMOVEITEM = "beforeremoveitem", | ||
AFTERREMOVEITEM = "afterremoveitem", | ||
BEFOREUPDATEITEM = "beforeupdateitem", | ||
AFTERUPDATEITEM = "afterupdateitem", | ||
BEFOREITEMVISIBILITYCHANGE = "beforeitemvisibilitychange", | ||
AFTERITEMVISIBILITYCHANGE = "afteritemvisibilitychange", | ||
BEFOREITEMSTATECHANGE = "beforeitemstatechange", | ||
AFTERITEMSTATECHANGE = "afteritemstatechange", | ||
BEFOREITEMREFRESH = "beforeitemrefresh", | ||
AFTERITEMREFRESH = "afteritemrefresh", | ||
BEFOREITEMSTATESCLEAR = "beforeitemstatesclear", | ||
AFTERITEMSTATESCLEAR = "afteritemstatesclear", | ||
BEFOREMODECHANGE = "beforemodechange", | ||
AFTERMODECHANGE = "aftermodechange", | ||
BEFORELAYOUT = "beforelayout", | ||
AFTERLAYOUT = "afterlayout", | ||
BEFORECREATEEDGE = "beforecreateedge", | ||
AFTERCREATEEDGE = "aftercreateedge", | ||
BEFOREGRAPHREFRESHPOSITION = "beforegraphrefreshposition", | ||
AFTERGRAPHREFRESHPOSITION = "aftergraphrefreshposition", | ||
BEFOREGRAPHREFRESH = "beforegraphrefresh", | ||
AFTERGRAPHREFRESH = "aftergraphrefresh", | ||
BEFOREANIMATE = "beforeanimate", | ||
AFTERANIMATE = "afteranimate", | ||
BEFOREPAINT = "beforepaint", | ||
AFTERPAINT = "afterpaint", | ||
BEFORECOLLAPSEEXPANDCOMBO = "beforecollapseexpandcombo", | ||
AFTERCOLLAPSEEXPANDCOMBO = "aftercollapseexpandcombo", | ||
GRAPHSTATECHANGE = "graphstatechange", | ||
AFTERACTIVATERELATIONS = "afteractivaterelations", | ||
NODESELECTCHANGE = "nodeselectchange", | ||
TOOLTIPCHANGE = "tooltipchange", | ||
WHEELZOOM = "wheelzoom", | ||
VIEWPORTCHANGE = "viewportchange", | ||
DRAGNODEEND = "dragnodeend", | ||
STACKCHANGE = "stackchange", | ||
TAP = "tap", | ||
PINCHSTART = "pinchstart", | ||
PINCHMOVE = "pinchmove", | ||
PANSTART = "panstart", | ||
PANMOVE = "panmove", | ||
PANEND = "panend" | ||
} | ||
export declare type DefaultBehaviorType = IG6GraphEvent | string | number | object; | ||
@@ -651,0 +519,0 @@ export interface BehaviorOption { |
@@ -6,6 +6,2 @@ "use strict"; | ||
}); | ||
var _exportNames = { | ||
G6Event: true | ||
}; | ||
exports.G6Event = void 0; | ||
@@ -16,3 +12,2 @@ var _interface = require("../interface"); | ||
if (key === "default" || key === "__esModule") return; | ||
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; | ||
if (key in exports && exports[key] === _interface[key]) return; | ||
@@ -25,176 +20,2 @@ Object.defineProperty(exports, key, { | ||
}); | ||
}); | ||
// Behavior type file | ||
var G6Event; | ||
exports.G6Event = G6Event; | ||
(function (G6Event) { | ||
// common events | ||
G6Event["CLICK"] = "click"; | ||
G6Event["DBLCLICK"] = "dblclick"; | ||
G6Event["MOUSEDOWN"] = "mousedown"; | ||
G6Event["MOUDEUP"] = "mouseup"; | ||
G6Event["CONTEXTMENU"] = "contextmenu"; | ||
G6Event["MOUSEENTER"] = "mouseenter"; | ||
G6Event["MOUSEOUT"] = "mouseout"; | ||
G6Event["MOUSEOVER"] = "mouseover"; | ||
G6Event["MOUSEMOVE"] = "mousemove"; | ||
G6Event["MOUSELEAVE"] = "mouseleave"; | ||
G6Event["DRAGSTART"] = "dragstart"; | ||
G6Event["DRAGEND"] = "dragend"; | ||
G6Event["DRAG"] = "drag"; | ||
G6Event["DRAGENTER"] = "dragenter"; | ||
G6Event["DRAGLEAVE"] = "dragleave"; | ||
G6Event["DRAGOVER"] = "dragover"; | ||
G6Event["DRAGOUT"] = "dragout"; | ||
G6Event["DDROP"] = "drop"; | ||
G6Event["KEYUP"] = "keyup"; | ||
G6Event["KEYDOWN"] = "keydown"; | ||
G6Event["WHEEL"] = "wheel"; | ||
G6Event["FOCUS"] = "focus"; | ||
G6Event["BLUR"] = "blur"; // touch events | ||
G6Event["TOUCHSTART"] = "touchstart"; | ||
G6Event["TOUCHMOVE"] = "touchmove"; | ||
G6Event["TOUCHEND"] = "touchend"; | ||
G6Event["CANVAS_TOUCHSTART"] = "canvas:touchstart"; | ||
G6Event["CANVAS_TOUCHMOVE"] = "canvas:touchmove"; | ||
G6Event["CANVAS_TOUCHEND"] = "canvas:touchend"; | ||
G6Event["NODE_TOUCHSTART"] = "node:touchstart"; | ||
G6Event["NODE_TOUCHMOVE"] = "node:touchmove"; | ||
G6Event["NODE_TOUCHEND"] = "node:touchend"; | ||
G6Event["COMBO_TOUCHSTART"] = "combo:touchstart"; | ||
G6Event["COMBO_TOUCHMOVE"] = "combo:touchmove"; | ||
G6Event["COMBO_TOUCHEND"] = "combo:touchend"; | ||
G6Event["EDGE_TOUCHSTART"] = "edge:touchstart"; | ||
G6Event["EDGE_TOUCHMOVE"] = "edge:touchmove"; | ||
G6Event["EDGE_TOUCHEND"] = "edge:touchend"; // node events | ||
G6Event["NODE_CONTEXTMENU"] = "node:contextmenu"; | ||
G6Event["NODE_CLICK"] = "node:click"; | ||
G6Event["NODE_DBLCLICK"] = "node:dblclick"; | ||
G6Event["NODE_MOUSEDOWN"] = "node:mousedown"; | ||
G6Event["NODE_MOUSEUP"] = "node:mouseup"; | ||
G6Event["NODE_MOUSEENTER"] = "node:mouseenter"; | ||
G6Event["NODE_MOUSELEAVE"] = "node:mouseleave"; | ||
G6Event["NODE_MOUSEMOVE"] = "node:mousemove"; | ||
G6Event["NODE_MOUSEOUT"] = "node:mouseout"; | ||
G6Event["NODE_MOUSEOVER"] = "node:mouseover"; | ||
G6Event["NODE_DROP"] = "node:drop"; | ||
G6Event["NODE_DRAGOVER"] = "node:dragover"; | ||
G6Event["NODE_DRAGENTER"] = "node:dragenter"; | ||
G6Event["NODE_DRAGLEAVE"] = "node:dragleave"; | ||
G6Event["NODE_DRAGSTART"] = "node:dragstart"; | ||
G6Event["NODE_DRAG"] = "node:drag"; | ||
G6Event["NODE_DRAGEND"] = "node:dragend"; | ||
G6Event["NODE_TAP"] = "node:tap"; | ||
G6Event["NODE_PANSTART"] = "node:panstart"; | ||
G6Event["NODE_PANMOVE"] = "node:panmove"; | ||
G6Event["NODE_PANEND"] = "node:panend"; // combo, extends from nodes | ||
G6Event["COMBO_CONTEXTMENU"] = "combo:contextmenu"; | ||
G6Event["COMBO_CLICK"] = "combo:click"; | ||
G6Event["COMBO_DBLCLICK"] = "combo:dblclick"; | ||
G6Event["COMBO_MOUSEDOWN"] = "combo:mousedown"; | ||
G6Event["COMBO_MOUSEUP"] = "combo:mouseup"; | ||
G6Event["COMBO_MOUSEENTER"] = "combo:mouseenter"; | ||
G6Event["COMBO_MOUSELEAVE"] = "combo:mouseleave"; | ||
G6Event["COMBO_MOUSEMOVE"] = "combo:mousemove"; | ||
G6Event["COMBO_MOUSEOUT"] = "combo:mouseout"; | ||
G6Event["COMBO_MOUSEOVER"] = "combo:mouseover"; | ||
G6Event["COMBO_DROP"] = "combo:drop"; | ||
G6Event["COMBO_DRAGOVER"] = "combo:dragover"; | ||
G6Event["COMBO_DRAGENTER"] = "combo:dragenter"; | ||
G6Event["COMBO_DRAGLEAVE"] = "combo:dragleave"; | ||
G6Event["COMBO_DRAGSTART"] = "combo:dragstart"; | ||
G6Event["COMBO_DRAG"] = "combo:drag"; | ||
G6Event["COMBO_DRAGEND"] = "combo:dragend"; | ||
G6Event["COMBO_TAP"] = "combo:tap"; | ||
G6Event["COMBO_PANSTART"] = "combo:panstart"; | ||
G6Event["COMBO_PANMOVE"] = "combo:panmove"; | ||
G6Event["COMBO_PANEND"] = "combo:panend"; // edge events | ||
G6Event["EDGE_CONTEXTMENU"] = "edge:contextmenu"; | ||
G6Event["EDGE_CLICK"] = "edge:click"; | ||
G6Event["EDGE_DBLCLICK"] = "edge:dblclick"; | ||
G6Event["EDGE_MOUSEDOWN"] = "edge:mousedown"; | ||
G6Event["EDGE_MOUSEUP"] = "edge:mouseup"; | ||
G6Event["EDGE_MOUSEENTER"] = "edge:mouseenter"; | ||
G6Event["EDGE_MOUSELEAVE"] = "edge:mouseleave"; | ||
G6Event["EDGE_MOUSEMOVE"] = "edge:mousemove"; | ||
G6Event["EDGE_MOUSEOUT"] = "edge:mouseout"; | ||
G6Event["EDGE_MOUSEOVER"] = "edge:mouseover"; | ||
G6Event["EDGE_DROP"] = "edge:drop"; | ||
G6Event["EDGE_DRAGOVER"] = "edge:dragover"; | ||
G6Event["EDGE_DRAGENTER"] = "edge:dragenter"; | ||
G6Event["EDGE_DRAGLEAVE"] = "edge:dragleave"; // canvas events | ||
G6Event["CANVAS_CONTEXTMENU"] = "canvas:contextmenu"; | ||
G6Event["CANVAS_CLICK"] = "canvas:click"; | ||
G6Event["CANVAS_DBLCLICK"] = "canvas:dblclick"; | ||
G6Event["CANVAS_MOUSEDOWN"] = "canvas:mousedown"; | ||
G6Event["CANVAS_MOUSEUP"] = "canvas:mouseup"; | ||
G6Event["CANVAS_MOUSEENTER"] = "canvas:mouseenter"; | ||
G6Event["CANVAS_MOUSELEAVE"] = "canvas:mouseleave"; | ||
G6Event["CANVAS_MOUSEMOVE"] = "canvas:mousemove"; | ||
G6Event["CANVAS_MOUSEOUT"] = "canvas:mouseout"; | ||
G6Event["CANVAS_MOUSEOVER"] = "canvas:mouseover"; | ||
G6Event["CANVAS_DROP"] = "canvas:drop"; | ||
G6Event["CANVAS_DRAGENTER"] = "canvas:dragenter"; | ||
G6Event["CANVAS_DRAGLEAVE"] = "canvas:dragleave"; | ||
G6Event["CANVAS_DRAGSTART"] = "canvas:dragstart"; | ||
G6Event["CANVAS_DRAG"] = "canvas:drag"; | ||
G6Event["CANVAS_DRAGEND"] = "canvas:dragend"; | ||
G6Event["CANVAS_TAP"] = "canvas:tap"; | ||
G6Event["CANVAS_PANSTART"] = "canvas:panstart"; | ||
G6Event["CANVAS_PANMOVE"] = "canvas:panmove"; | ||
G6Event["CANVAS_PANEND"] = "canvas:panend"; // timing events | ||
G6Event["BEFORERENDER"] = "beforerender"; | ||
G6Event["AFTERRENDER"] = "afterrender"; | ||
G6Event["BEFOREADDITEM"] = "beforeadditem"; | ||
G6Event["AFTERADDITEM"] = "afteradditem"; | ||
G6Event["BEFOREREMOVEITEM"] = "beforeremoveitem"; | ||
G6Event["AFTERREMOVEITEM"] = "afterremoveitem"; | ||
G6Event["BEFOREUPDATEITEM"] = "beforeupdateitem"; | ||
G6Event["AFTERUPDATEITEM"] = "afterupdateitem"; | ||
G6Event["BEFOREITEMVISIBILITYCHANGE"] = "beforeitemvisibilitychange"; | ||
G6Event["AFTERITEMVISIBILITYCHANGE"] = "afteritemvisibilitychange"; | ||
G6Event["BEFOREITEMSTATECHANGE"] = "beforeitemstatechange"; | ||
G6Event["AFTERITEMSTATECHANGE"] = "afteritemstatechange"; | ||
G6Event["BEFOREITEMREFRESH"] = "beforeitemrefresh"; | ||
G6Event["AFTERITEMREFRESH"] = "afteritemrefresh"; | ||
G6Event["BEFOREITEMSTATESCLEAR"] = "beforeitemstatesclear"; | ||
G6Event["AFTERITEMSTATESCLEAR"] = "afteritemstatesclear"; | ||
G6Event["BEFOREMODECHANGE"] = "beforemodechange"; | ||
G6Event["AFTERMODECHANGE"] = "aftermodechange"; | ||
G6Event["BEFORELAYOUT"] = "beforelayout"; | ||
G6Event["AFTERLAYOUT"] = "afterlayout"; | ||
G6Event["BEFORECREATEEDGE"] = "beforecreateedge"; | ||
G6Event["AFTERCREATEEDGE"] = "aftercreateedge"; | ||
G6Event["BEFOREGRAPHREFRESHPOSITION"] = "beforegraphrefreshposition"; | ||
G6Event["AFTERGRAPHREFRESHPOSITION"] = "aftergraphrefreshposition"; | ||
G6Event["BEFOREGRAPHREFRESH"] = "beforegraphrefresh"; | ||
G6Event["AFTERGRAPHREFRESH"] = "aftergraphrefresh"; | ||
G6Event["BEFOREANIMATE"] = "beforeanimate"; | ||
G6Event["AFTERANIMATE"] = "afteranimate"; | ||
G6Event["BEFOREPAINT"] = "beforepaint"; | ||
G6Event["AFTERPAINT"] = "afterpaint"; | ||
G6Event["BEFORECOLLAPSEEXPANDCOMBO"] = "beforecollapseexpandcombo"; | ||
G6Event["AFTERCOLLAPSEEXPANDCOMBO"] = "aftercollapseexpandcombo"; | ||
G6Event["GRAPHSTATECHANGE"] = "graphstatechange"; | ||
G6Event["AFTERACTIVATERELATIONS"] = "afteractivaterelations"; | ||
G6Event["NODESELECTCHANGE"] = "nodeselectchange"; | ||
G6Event["TOOLTIPCHANGE"] = "tooltipchange"; | ||
G6Event["WHEELZOOM"] = "wheelzoom"; | ||
G6Event["VIEWPORTCHANGE"] = "viewportchange"; | ||
G6Event["DRAGNODEEND"] = "dragnodeend"; | ||
G6Event["STACKCHANGE"] = "stackchange"; // Mobile event support | ||
G6Event["TAP"] = "tap"; | ||
G6Event["PINCHSTART"] = "pinchstart"; | ||
G6Event["PINCHMOVE"] = "pinchmove"; | ||
G6Event["PANSTART"] = "panstart"; | ||
G6Event["PANMOVE"] = "panmove"; | ||
G6Event["PANEND"] = "panend"; | ||
})(G6Event || (exports.G6Event = G6Event = {})); | ||
}); |
{ | ||
"name": "@antv/g6-core", | ||
"version": "0.6.3", | ||
"version": "0.6.4", | ||
"description": "A Graph Visualization Framework in JavaScript", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1132857
33433