Update Tests and Documentation

This commit is contained in:
bmartinson
2018-03-28 13:00:29 -07:00
parent 5c35553087
commit 47c0bffc9a
2 changed files with 30 additions and 0 deletions

View File

@@ -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");

View File

@@ -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();
}