Indicates which key enable alternate action on corner
values: 'altKey', 'shiftKey', 'ctrlKey'.
If null
or 'none' or any other string that is not a modifier key
feature is disabled feature disabled.
Indicates which key enable alternative selection
in case of target overlapping with active object
values: 'altKey', 'shiftKey', 'ctrlKey'.
For a series of reason that come from the general expectations on how
things should work, this feature works only for preserveObjectStacking true.
If null
or 'none' or any other string that is not a modifier key
feature is disabled.
Background color of canvas instance. Should be set via {@link fabric.StaticCanvas#setBackgroundColor}.
Background image of canvas instance. Should be set via {@link fabric.StaticCanvas#setBackgroundImage}. Backwards incompatibility note: The "backgroundImageOpacity" and "backgroundImageStretch" properties are deprecated since 1.3.9. Use {@link fabric.Image#opacity}, {@link fabric.Image#width} and {@link fabric.Image#height}. since 2.4.0 image caching is active, please when putting an image as background, add to the canvas property a reference to the canvas it is on. Otherwise the image cannot detect the zoom vale. As an alternative you can disable image objectCaching
if set to false background image is not affected by viewport transform
Indicates which key enable centered Transform
values: 'altKey', 'shiftKey', 'ctrlKey'.
If null
or 'none' or any other string that is not a modifier key
feature is disabled feature disabled.
When true, objects use center point as the origin of rotate transformation. Backwards incompatibility note: This property replaces "centerTransform" (Boolean).
When true, objects use center point as the origin of scale transformation. Backwards incompatibility note: This property replaces "centerTransform" (Boolean).
a fabricObject that, without stroke define a clipping area with their shape. filled in black the clipPath object gets used when the canvas has rendered, and the context is placed in the top left corner of the canvas. clipPath will clip away controls, if you do not want this to happen use controlsAboveOverlay = true
Default element class that's given to wrapper (div) element of canvas
Indicates whether object controls (borders/controls) are rendered above overlay image
Default cursor value used for the entire canvas
When true, canvas is scaled by devicePixelRatio for better rendering on retina screens
Color of object's fill
Indicates if the canvas can fire middle click events
Indicates if the canvas can fire right click events
Cursor value used during free drawing
Canvas height
Default cursor value used when hovering over an object on canvas
Unique id of Canvas
Indicates whether this canvas will use image smoothing, this is on by default in browsers
Indicates whether toObject/toDatalessObject should include default values if set to false, takes precedence over the object value.
Indicates that canvas is interactive. This property should not be changed.
When true, mouse events on canvas (mousedown/mousemove/mouseup) result in free drawing.
After mousedown, mousemove creates a shape,
and then mouseup finalizes it and adds an instance of fabric.Path
onto canvas.
Default cursor value used when moving an object on canvas
Cursor value used for disabled elements ( corners with disabled action )
Overlay color of canvas instance. Should be set via {@link fabric.StaticCanvas#setOverlayColor}
Overlay image of canvas instance. Should be set via {@link fabric.StaticCanvas#setOverlayImage}. Backwards incompatibility note: The "overlayImageLeft" and "overlayImageTop" properties are deprecated since 1.3.9. Use {@link fabric.Image#left} and {@link fabric.Image#top}. since 2.4.0 image caching is active, please when putting an image as overlay, add to the canvas property a reference to the canvas it is on. Otherwise the image cannot detect the zoom vale. As an alternative you can disable image objectCaching
if set to false overlay image is not affected by viewport transform
When true, object detection happens on per-pixel basis rather than on per-bounding-box
Indicates whether objects should remain in current stack position when selected. When false objects are brought to top and rendered as part of the selection group
Indicates whether {@link fabric.Collection.add}, {@link fabric.Collection.insertAt} and {@link fabric.Collection.remove}, {@link fabric.StaticCanvas.moveTo}, {@link fabric.StaticCanvas.clear} and many more, should also re-render canvas. Disabling this option will not give a performance boost when adding/removing a lot of objects to/from canvas at once since the renders are quequed and executed one per frame. Disabling is suggested anyway and managing the renders of the app manually is not a big effort ( canvas.requestRenderAll() ) Left default to true to do not break documentation and old app, fiddles.
Cursor value used for rotation point
Indicates whether group selection should be enabled
Color of the border of selection (usually slightly darker than color of selection itself)
Color of selection
Default dash array pattern If not empty the selection border is dashed
Select only shapes that are fully contained in the dragged selection rectangle.
Indicates which key or keys enable multiple click selection
Pass value as a string or array of strings
values: 'altKey', 'shiftKey', 'ctrlKey'.
If null
or empty or containing any other string that is not a modifier key
feature is disabled.
Width of a line used in object/group selection
Based on vptCoords and object.aCoords, skip rendering of objects that are not included in current viewport. May greatly help in applications with crowded canvas and use of zoom/pan If One of the corner of the bounding box of the object is on the canvas the objects get rendered.
When true, target detection is skipped when hovering over canvas. This can be used to improve performance.
Indicates the angle that an object will lock to while rotating.
Indicates the distance from the snapAngle the rotation will lock to the snapAngle.
When null
, the snapThreshold will default to the snapAngle.
Indicates whether objects' state should be saved
Indicates if the right click on canvas can output the context menu or not
When true, getSvgTransform() will apply the StaticCanvas.viewportTransform to the SVG transformation. When true, a zoomed canvas will then produce zoomed SVG output.
Number of pixels around target pixel to tolerate (consider active) during object detection
Keep track of the subTargets for Mouse Events
Indicates which key enable unproportional scaling
values: 'altKey', 'shiftKey', 'ctrlKey'.
If null
or 'none' or any other string that is not a modifier key
feature is disabled feature disabled.
When true, objects can be transformed by one side (unproportionally) when dragged on the corners that normally would not do that.
The transformation (in the format of Canvas transform) which focuses the viewport
Describe canvas element extension over design properties are tl,tr,bl,br. if canvas is not zoomed/panned those points are the four corner of canvas if canvas is viewportTransformed you those points indicate the extension of canvas element in plain untrasformed coordinates The coordinates get updated with @method calcViewportBoundaries.
Canvas width
Generated using TypeDoc
Indicates whether the browser can be scrolled when using a touchscreen and dragging on the canvas