NuclearDispersionSystem/ant-design-vue-jeecg/node_modules/@antv/g2/esm/constant.js
2023-09-14 14:47:11 +08:00

108 lines
3.7 KiB
Java
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/**
* view 中三层 group 分层 key
*/
export var LAYER;
(function (LAYER) {
/** 前景层 */
LAYER["FORE"] = "fore";
/** 中间层 */
LAYER["MID"] = "mid";
/** 背景层 */
LAYER["BG"] = "bg";
})(LAYER || (LAYER = {}));
/**
* 组件在画布的布局方位 12 方位
*/
export var DIRECTION;
(function (DIRECTION) {
DIRECTION["TOP"] = "top";
DIRECTION["TOP_LEFT"] = "top-left";
DIRECTION["TOP_RIGHT"] = "top-right";
DIRECTION["RIGHT"] = "right";
DIRECTION["RIGHT_TOP"] = "right-top";
DIRECTION["RIGHT_BOTTOM"] = "right-bottom";
DIRECTION["LEFT"] = "left";
DIRECTION["LEFT_TOP"] = "left-top";
DIRECTION["LEFT_BOTTOM"] = "left-bottom";
DIRECTION["BOTTOM"] = "bottom";
DIRECTION["BOTTOM_LEFT"] = "bottom-left";
DIRECTION["BOTTOM_RIGHT"] = "bottom-right";
// no direction information
DIRECTION["NONE"] = "none";
})(DIRECTION || (DIRECTION = {}));
/**
* 组件的类型,可能会影响到布局算法
*/
export var COMPONENT_TYPE;
(function (COMPONENT_TYPE) {
/** axis 组件 */
COMPONENT_TYPE["AXIS"] = "axis";
/** grid 组件 */
COMPONENT_TYPE["GRID"] = "grid";
/** legend 组件 */
COMPONENT_TYPE["LEGEND"] = "legend";
/** tooltip 组件 */
COMPONENT_TYPE["TOOLTIP"] = "tooltip";
/** annotation 组件 */
COMPONENT_TYPE["ANNOTATION"] = "annotation";
/** 其他组件,自定义组件 */
COMPONENT_TYPE["OTHER"] = "other";
})(COMPONENT_TYPE || (COMPONENT_TYPE = {}));
/**
* 三层 group 的 z index
*/
export var GROUP_Z_INDEX = {
FORE: 3,
MID: 2,
BG: 1,
};
/**
* View 的生命周期阶段(和 3.x 的生命周期略有不同)
* 我们需要先确定在那写场景需要用到生命周期,如果只是为了在生命周期插入一下什么组件之类的,那么在现有架构就是不需要的
*/
export var VIEW_LIFE_CIRCLE;
(function (VIEW_LIFE_CIRCLE) {
VIEW_LIFE_CIRCLE["BEFORE_RENDER"] = "beforerender";
VIEW_LIFE_CIRCLE["AFTER_RENDER"] = "afterrender";
VIEW_LIFE_CIRCLE["BEFORE_PAINT"] = "beforepaint";
VIEW_LIFE_CIRCLE["AFTER_PAINT"] = "afterpaint";
VIEW_LIFE_CIRCLE["BEFORE_CHANGE_DATA"] = "beforechangedata";
VIEW_LIFE_CIRCLE["AFTER_CHANGE_DATA"] = "afterchangedata";
VIEW_LIFE_CIRCLE["BEFORE_CLEAR"] = "beforeclear";
VIEW_LIFE_CIRCLE["AFTER_CLEAR"] = "afterclear";
VIEW_LIFE_CIRCLE["BEFORE_DESTROY"] = "beforedestroy";
})(VIEW_LIFE_CIRCLE || (VIEW_LIFE_CIRCLE = {}));
/**
* 绘图区的事件列表
*/
export var PLOT_EVENTS;
(function (PLOT_EVENTS) {
// mouse 事件
PLOT_EVENTS["MOUSE_ENTER"] = "plot:mouseenter";
PLOT_EVENTS["MOUSE_DOWN"] = "plot:mousedown";
PLOT_EVENTS["MOUSE_MOVE"] = "plot:mousemove";
PLOT_EVENTS["MOUSE_UP"] = "plot:mouseup";
PLOT_EVENTS["MOUSE_LEAVE"] = "plot:mouseleave";
// 移动端事件
PLOT_EVENTS["TOUCH_START"] = "plot:touchstart";
PLOT_EVENTS["TOUCH_MOVE"] = "plot:touchmove";
PLOT_EVENTS["TOUCH_END"] = "plot:touchend";
PLOT_EVENTS["TOUCH_CANCEL"] = "plot:touchcancel";
// click 事件
PLOT_EVENTS["CLICK"] = "plot:click";
PLOT_EVENTS["DBLCLICK"] = "plot:dblclick";
PLOT_EVENTS["CONTEXTMENU"] = "plot:contextmenu";
PLOT_EVENTS["LEAVE"] = "plot:leave";
PLOT_EVENTS["ENTER"] = "plot:enter";
})(PLOT_EVENTS || (PLOT_EVENTS = {}));
/** 参与分组的图形属性名 */
export var GROUP_ATTRS = ['color', 'shape', 'size'];
/** 存储原始数据的字段名 */
export var FIELD_ORIGIN = '_origin';
/** 最小的图表宽度 */
export var MIN_CHART_WIDTH = 1;
/** 最小的图表高度 */
export var MIN_CHART_HEIGHT = 1;
/** 辅助组件占图表的尺寸的最大比例如图表上方的图例最多占图表高度的25% */
export var COMPONENT_MAX_VIEW_PERCENTAGE = 0.25;
//# sourceMappingURL=constant.js.map