export var PenType;
(function (PenType) {
    PenType[PenType["Node"] = 0] = "Node";
    PenType[PenType["Line"] = 1] = "Line";
})(PenType || (PenType = {}));
export var LockState;
(function (LockState) {
    LockState[LockState["None"] = 0] = "None";
    LockState[LockState["DisableEdit"] = 1] = "DisableEdit";
    LockState[LockState["DisableMove"] = 2] = "DisableMove";
    LockState[LockState["DisableScale"] = 3] = "DisableScale";
    LockState[LockState["DisableMoveScale"] = 4] = "DisableMoveScale";
    // DisableActive,
    LockState[LockState["Disable"] = 10] = "Disable";
})(LockState || (LockState = {}));
export var AnchorMode;
(function (AnchorMode) {
    AnchorMode[AnchorMode["Default"] = 0] = "Default";
    AnchorMode[AnchorMode["In"] = 1] = "In";
    AnchorMode[AnchorMode["Out"] = 2] = "Out";
})(AnchorMode || (AnchorMode = {}));
export var Gradient;
(function (Gradient) {
    Gradient[Gradient["None"] = 0] = "None";
    Gradient[Gradient["Linear"] = 1] = "Linear";
    Gradient[Gradient["Radial"] = 2] = "Radial";
})(Gradient || (Gradient = {}));
//所在画布层 值和画布zIndex对应
export var CanvasLayer;
(function (CanvasLayer) {
    CanvasLayer[CanvasLayer["CanvasTemplate"] = 1] = "CanvasTemplate";
    CanvasLayer[CanvasLayer["CanvasImageBottom"] = 2] = "CanvasImageBottom";
    CanvasLayer[CanvasLayer["CanvasMain"] = 3] = "CanvasMain";
    CanvasLayer[CanvasLayer["CanvasImage"] = 4] = "CanvasImage"; //顶部图片层
})(CanvasLayer || (CanvasLayer = {}));
// export enum Flip {
//   None, // 正常
//   Horizontal, // 水平翻转
//   Vertical, // 垂直翻转
//   Both, // 全翻转
// }
// 修改哪些属性需要重现计算 textRect
export const needCalcTextRectProps = [
    'text',
    'textWidth',
    'textHeight',
    'textLeft',
    'textTop',
    'fontFamily',
    'fontSize',
    'lineHeight',
    'fontStyle',
    'fontWeight',
    'textAlign',
    'textBaseline',
    'whiteSpace',
    'ellipsis',
    'keepDecimal',
    'letterSpacing'
];
export const needSetPenProps = ['x', 'y', 'width', 'height', 'flipX', 'flipY'];
export const needPatchFlagsPenRectProps = [
    'paddingTop',
    'paddingRight',
    'paddingBottom',
    'paddingLeft',
    'flipX',
    'flipY',
    'visible',
    'showChild',
];
export const needCalcIconRectProps = ['iconLeft', 'iconTop', 'iconRotate'];
export const needImgCanvasPatchFlagsProps = ['globalAlpha', 'flipY', 'flipX', 'x', 'y', 'width', 'height', 'iconWidth', 'iconHeight', 'imageRatio', 'iconLeft', 'iconTop', 'iconAlign', 'rotate', 'visible'];
export var LineAnimateType;
(function (LineAnimateType) {
    LineAnimateType[LineAnimateType["Normal"] = 0] = "Normal";
    LineAnimateType[LineAnimateType["Beads"] = 1] = "Beads";
    LineAnimateType[LineAnimateType["Dot"] = 2] = "Dot";
    LineAnimateType[LineAnimateType["Arrow"] = 3] = "Arrow";
    LineAnimateType[LineAnimateType["WaterDrop"] = 4] = "WaterDrop";
    LineAnimateType[LineAnimateType["Custom"] = 5] = "Custom"; // 自定义动画
})(LineAnimateType || (LineAnimateType = {}));
export var lineAnimateTargetType;
(function (lineAnimateTargetType) {
    lineAnimateTargetType[lineAnimateTargetType["Image"] = 0] = "Image";
    lineAnimateTargetType[lineAnimateTargetType["Icon"] = 1] = "Icon";
    lineAnimateTargetType[lineAnimateTargetType["Pen"] = 2] = "Pen";
    lineAnimateTargetType[lineAnimateTargetType["Element"] = 3] = "Element"; //自定义元素
})(lineAnimateTargetType || (lineAnimateTargetType = {}));
/**
 * dom 类型的 图形
 */
export const isDomShapes = [
    'gif',
    'iframe',
    'video',
    'echarts',
    'highcharts',
    'lightningCharts',
    'vue'
];
/**
 *  交互图元
 */
export const isInteraction = [
    'radio',
    'checkbox',
    'button',
    'inputDom',
    'slider',
    'echarts',
];
// 格式刷同步的属性
export const formatAttrs = new Set([
    'borderRadius',
    // 'rotate',
    'paddingLeft',
    'paddingRight',
    'paddingTop',
    'paddingBottom',
    'progress',
    'progressColor',
    'verticalProgress',
    'reverseProgress',
    // 'flip',
    'flipX',
    'flipY',
    'input',
    'lineDash',
    'lineCap',
    'lineJoin',
    'strokeType',
    'lineGradientFromColor',
    'lineGradientToColor',
    'lineGradientAngle',
    'color',
    'hoverColor',
    'activeColor',
    'lineWidth',
    'bkType',
    'gradientFromColor',
    'gradientToColor',
    'gradientAngle',
    'gradientRadius',
    'hoverBackground',
    'activeBackground',
    'globalAlpha',
    'anchorColor',
    'anchorRadius',
    'shadow',
    'shadowColor',
    'shadowBlur',
    'shadowOffsetX',
    'shadowOffsetY',
    'textHasShadow',
    'fontFamily',
    'fontSize',
    'textColor',
    'hoverTextColor',
    'activeTextColor',
    'textBackground',
    'fontStyle',
    'fontWeight',
    'textAlign',
    'textBaseline',
    'lineHeight',
    'whiteSpace',
    'textWidth',
    'textHeight',
    'textLeft',
    'textTop',
    'ellipsis',
    'hiddenText',
    'keepDecimal',
    'borderWidth',
    'borderColor',
    'animateLineWidth',
    'lineAnimateType',
    'frames',
    'animateColor',
    'animateType',
    'animateReverse',
    'background',
    'gradientColors',
    'lineGradientColors',
    'animateLineWidth',
    'gradientSmooth',
    'lineSmooth',
    'animations',
    'toArrow',
    'fromArrow',
    'lineName',
    'textType',
    'textGradientColors',
]);
export const defaultFormat = {
    'textType': 0,
    'bkType': 0,
    'strokeType': 0,
};
/**
 * 清空 pen 的 生命周期
 */
export function clearLifeCycle(pen) {
    pen.onAdd = undefined;
    pen.onValue = undefined;
    pen.onBeforeValue = undefined;
    pen.onDestroy = undefined;
    pen.onMove = undefined;
    pen.onResize = undefined;
    pen.onRotate = undefined;
    pen.onClick = undefined;
    pen.onMouseEnter = undefined;
    pen.onMouseLeave = undefined;
    pen.onMouseDown = undefined;
    pen.onMouseMove = undefined;
    pen.onMouseUp = undefined;
    pen.onShowInput = undefined;
    pen.onInput = undefined;
    pen.onChangeId = undefined;
    pen.onBinds = undefined;
    pen.onStartVideo = undefined;
    pen.onPauseVideo = undefined;
    pen.onStopVideo = undefined;
    pen.onRenderPenRaw = undefined;
    pen.onKeyDown = undefined;
    pen.onContextmenu = undefined;
    pen.onScale = undefined;
    pen.onWheel = undefined;
    pen.onConnectLine = undefined;
}
//# sourceMappingURL=model.js.map