mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
fabricjs: fix setBackgroundImage
setBackgroundImage takes two mandatory args and an optional argument. http://fabricjs.com/docs/fabric.StaticCanvas.html#setBackgroundImage
This commit is contained in:
@@ -1056,4 +1056,10 @@ function sample8() {
|
||||
obj.setCoords();
|
||||
});
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
function sample9() {
|
||||
var canvas = new fabric.Canvas('c');
|
||||
canvas.setBackgroundImage('yolo.jpg', () => {"a"}, {opacity: 45});
|
||||
canvas.setBackgroundImage('yolo.jpg', () => {"a"});
|
||||
}
|
||||
|
||||
Vendored
+1
-1
@@ -546,7 +546,7 @@ declare module fabric {
|
||||
|
||||
sendBackwards(object: IObject): ICanvas;
|
||||
sendToBack(object: IObject): ICanvas;
|
||||
setBackgroundImage(object: IObject): ICanvas;
|
||||
setBackgroundImage(image: any, callback: () => any, options?): ICanvas;
|
||||
setDimensions(object: { width: number; height: number; }): ICanvas;
|
||||
setHeight(height: number): ICanvas;
|
||||
setOverlayImage(url: string, callback: () => any, options): ICanvas;
|
||||
|
||||
Reference in New Issue
Block a user