mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-06-05 20:02:05 +08:00
Update Tests and Documentation
This commit is contained in:
1
types/fabric/index.d.ts
vendored
1
types/fabric/index.d.ts
vendored
@@ -4,6 +4,7 @@
|
||||
// Joseph Livecchi <https://github.com/joewashear007>
|
||||
// Michael Randolph <https://github.com/mrand01>
|
||||
// Tiger Oakes <https://github.com/NotWoods>
|
||||
// Brian Martinson <https://github.com/bmartinson>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.1
|
||||
export import fabric = require("./fabric-impl");
|
||||
|
||||
@@ -1032,3 +1032,32 @@ function sample9() {
|
||||
canvas.setBackgroundImage('yolo.jpg', () => { "a"; }, { opacity: 45 });
|
||||
canvas.setBackgroundImage('yolo.jpg', () => { "a"; });
|
||||
}
|
||||
|
||||
function sample10() {
|
||||
const canvas = new fabric.Canvas('c');
|
||||
const objR = new fabric.Rect({
|
||||
top: 10,
|
||||
left: 10,
|
||||
width: 10,
|
||||
height: 10,
|
||||
fill: "#FF0000",
|
||||
});
|
||||
const objG = new fabric.Rect({
|
||||
top: 15,
|
||||
left: 15,
|
||||
width: 10,
|
||||
height: 10,
|
||||
fill: "#00FF00",
|
||||
});
|
||||
const objB = new fabric.Rect({
|
||||
top: 20,
|
||||
left: 20,
|
||||
width: 10,
|
||||
height: 10,
|
||||
fill: "#0000FF",
|
||||
});
|
||||
canvas.add(objR);
|
||||
canvas.add(objG);
|
||||
canvas.add(objB);
|
||||
const objArray = canvas.getActiveObjects();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user