Skip to content

Commit

Permalink
added test and bad snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
asturur committed Apr 22, 2024
1 parent ddb33a5 commit 1470524
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions test/visual/control_rendering.js
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,33 @@
fabricClass: 'Canvas',
});

function controlboxFlippedXInGroup(canvas, callback) {
var rect = new fabric.Rect({
width: 90, height: 90, padding: 9, angle: 0, flipX: true,
cornerSize: 12, cornerColor: 'green', cornerStrokeColor: 'blue',
transparentCorners: false, borderScaleFactor: 3,
fill: 'red', top: 50, left: 35,
});
var group = new fabric.Group([rect], {
interactive: true,
subTargetCheck: true,
});
canvas.add(group);
canvas.setActiveObject(rect);
canvas.renderAll();
callback(canvas.lowerCanvasEl);
}

tests.push({
test: 'controlbox with flipped X in group',
code: controlboxFlippedXInGroup,
golden: 'controls11group.png',
percentage: 0.004,
width: 150,
height: 180,
fabricClass: 'Canvas',
});

function controlboxOpacitySingle(canvas, callback) {
var rect = new fabric.Rect({
width: 90, height: 90, padding: 3, opacity: 0.4,
Expand Down
Binary file added test/visual/golden/controls11group.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 1470524

Please sign in to comment.