fabric
Version:
Object model for HTML5 canvas, and SVG-to-canvas parser. Backed by jsdom and node-canvas.
2 lines • 1.44 kB
JavaScript
import{RESIZING as e,ROTATE as t}from"../constants.min.mjs";import{changeWidth as n}from"./changeWidth.min.mjs";import{Control as r}from"./Control.min.mjs";import{rotationStyleHandler as i,rotationWithSnapping as a}from"./rotate.min.mjs";import{scaleCursorStyleHandler as o,scalingEqually as s}from"./scale.min.mjs";import{scaleOrSkewActionName as c,scaleSkewCursorStyleHandler as l,scalingXOrSkewingY as u,scalingYOrSkewingX as d}from"./scaleSkew.min.mjs";const f=()=>({ml:new r({x:-.5,y:0,cursorStyleHandler:l,actionHandler:u,getActionName:c}),mr:new r({x:.5,y:0,cursorStyleHandler:l,actionHandler:u,getActionName:c}),mb:new r({x:0,y:.5,cursorStyleHandler:l,actionHandler:d,getActionName:c}),mt:new r({x:0,y:-.5,cursorStyleHandler:l,actionHandler:d,getActionName:c}),tl:new r({x:-.5,y:-.5,cursorStyleHandler:o,actionHandler:s}),tr:new r({x:.5,y:-.5,cursorStyleHandler:o,actionHandler:s}),bl:new r({x:-.5,y:.5,cursorStyleHandler:o,actionHandler:s}),br:new r({x:.5,y:.5,cursorStyleHandler:o,actionHandler:s}),mtr:new r({x:0,y:-.5,actionHandler:a,cursorStyleHandler:i,offsetY:-40,withConnection:!0,actionName:t})}),p=()=>({mr:new r({x:.5,y:0,actionHandler:n,cursorStyleHandler:l,actionName:e}),ml:new r({x:-.5,y:0,actionHandler:n,cursorStyleHandler:l,actionName:e})}),m=()=>({...f(),...p()});export{f as createObjectDefaultControls,p as createResizeControls,m as createTextboxDefaultControls};
//# sourceMappingURL=commonControls.min.mjs.map