fabricjs library

Classes

ActiveSelection
rect1 and rect2 are 2 object on a canvas, canvas is the canvas instance var selection = new fabric.ActiveSelection(rect1, rect2, { canvas: canvas }); canvas.setActiveObject(selection);
BoundingRect
Canvas
canvas = new fabric.Canvas(html.querySelector('#canvas'), { hoverCursor: 'pointer', selection: true, selectionBorderColor: 'blue', isDrawingMode: true });
Circle
FabricObject
Group
IDataURLOptions
Image
IText
Line
Line(i, 25, i, 50,
ModifiedEvent
object:modified
MouseDownEvent
mouse:down
MouseMoveEvent
mouse:move
MouseUpEvent
mouse:up
MouseWheelEvent
mouse:wheel
ObjectMovingEvent
object:moving
ObjectScalingEvent
object:scaling
Point
Rect
SelectionEvent
selection:created
StateProperties
Text
var t = new fabric.Text(stationID, { fontFamily: 'Calibri', fontSize: 1.2, textAlign: 'center', originX: 'center', originY: 'center', left: LayoutCoordX(STA), top: LayoutCoordY(BL-BLOffset)-radius-.4 });
Textbox
Triangle

Functions

getKeysOfObject(dynamic jsObject) List<String>
getObjectEntries(dynamic jsObject) List<List>
groupSVGElements(List elements, [dynamic options, String path]) Group
Groups SVG elements (usually those retrieved from SVG document)
jsObjToMap(dynamic object) → dynamic
convert the a javascript object to a valid map
jsonStringify(dynamic obj) String
jsToMap(dynamic jsObject) Map
A workaround to converting an object from JS to a Dart Map.
loadSVGFromString(String string, void callback(List<FabricObject> results, dynamic options), [Function reviver]) → void
loadSVGFromURL(String url, void callback(List results, dynamic options, dynamic elements, dynamic allElements), [Function reviver, dynamic options]) → void
Takes url corresponding to an SVG document, and parses it into a set of fabric objects. Note that SVG is fetched via XMLHttpRequest, so it needs to conform to SOP (Same Origin Policy) /void Function (List