fabric
Version:
Object model for HTML5 canvas, and SVG-to-canvas parser. Backed by jsdom and node-canvas.
112 lines (111 loc) • 2.25 kB
JavaScript
import { CENTER, FILL, LEFT, SCALE_X, SCALE_Y, SKEW_X, SKEW_Y, STROKE } from "../../constants.mjs";
//#region src/shapes/Object/defaultValues.ts
const stateProperties = [
"top",
LEFT,
SCALE_X,
SCALE_Y,
"flipX",
"flipY",
"originX",
"originY",
"angle",
"opacity",
"globalCompositeOperation",
"shadow",
"visible",
SKEW_X,
SKEW_Y
];
const cacheProperties = [
FILL,
STROKE,
"strokeWidth",
"strokeDashArray",
"width",
"height",
"paintFirst",
"strokeUniform",
"strokeLineCap",
"strokeDashOffset",
"strokeLineJoin",
"strokeMiterLimit",
"backgroundColor",
"clipPath"
];
const fabricObjectDefaultValues = {
top: 0,
left: 0,
width: 0,
height: 0,
angle: 0,
flipX: false,
flipY: false,
scaleX: 1,
scaleY: 1,
minScaleLimit: 0,
skewX: 0,
skewY: 0,
originX: CENTER,
originY: CENTER,
strokeWidth: 1,
strokeUniform: false,
padding: 0,
opacity: 1,
paintFirst: FILL,
fill: "rgb(0,0,0)",
fillRule: "nonzero",
stroke: null,
strokeDashArray: null,
strokeDashOffset: 0,
strokeLineCap: "butt",
strokeLineJoin: "miter",
strokeMiterLimit: 4,
globalCompositeOperation: "source-over",
backgroundColor: "",
shadow: null,
visible: true,
includeDefaultValues: true,
excludeFromExport: false,
objectCaching: true,
clipPath: void 0,
inverted: false,
absolutePositioned: false,
centeredRotation: true,
centeredScaling: false,
dirty: true
};
const interactiveObjectDefaultValues = {
noScaleCache: true,
lockMovementX: false,
lockMovementY: false,
lockRotation: false,
lockScalingX: false,
lockScalingY: false,
lockSkewingX: false,
lockSkewingY: false,
lockScalingFlip: false,
cornerSize: 13,
touchCornerSize: 24,
transparentCorners: true,
cornerColor: "rgb(178,204,255)",
cornerStrokeColor: "",
cornerStyle: "rect",
cornerDashArray: null,
hasControls: true,
borderColor: "rgb(178,204,255)",
borderDashArray: null,
borderOpacityWhenMoving: .4,
borderScaleFactor: 1,
hasBorders: true,
selectionBackgroundColor: "",
selectable: true,
evented: true,
perPixelTargetFind: false,
activeOn: "down",
hoverCursor: null,
moveCursor: null
};
//#endregion
export { cacheProperties, fabricObjectDefaultValues, interactiveObjectDefaultValues, stateProperties };
//# sourceMappingURL=defaultValues.mjs.map