mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-16 15:00:26 +00:00
fabric: Add freeDrawingBrush to StaticCanvas. (#35778)
* Add freeDrawingBrush. Add freedrawingBrush property to StaticCanvas class and accompanying FreeDrawingBrush interface. * Fix whitespace and implicit public. * Remove 'public' modifiers on FreeDrawingBrush * Remove implicit public and whitespace -> tab.
This commit is contained in:
committed by
Sheetal Nandi
parent
035ef670e2
commit
1fe4a61823
Vendored
+15
@@ -1070,6 +1070,19 @@ interface IStaticCanvasOptions {
|
||||
*/
|
||||
svgViewportTransformation?: boolean;
|
||||
}
|
||||
|
||||
export interface FreeDrawingBrush {
|
||||
/**
|
||||
* Can be any regular color value.
|
||||
*/
|
||||
color: string;
|
||||
|
||||
/**
|
||||
* Brush width measured in pixels.
|
||||
*/
|
||||
width: number;
|
||||
}
|
||||
|
||||
export interface StaticCanvas extends IObservable<StaticCanvas>, IStaticCanvasOptions, ICollection<StaticCanvas>, ICanvasAnimation<StaticCanvas> { }
|
||||
export class StaticCanvas {
|
||||
/**
|
||||
@@ -1082,6 +1095,8 @@ export class StaticCanvas {
|
||||
|
||||
_activeObject?: Object | Group;
|
||||
|
||||
freeDrawingBrush: FreeDrawingBrush;
|
||||
|
||||
/**
|
||||
* Calculates canvas element offset relative to the document
|
||||
* This method is also attached as "resize" event handler of window
|
||||
|
||||
Reference in New Issue
Block a user