Skip to content

Commit 1470524

Browse files
committed
added test and bad snapshot
1 parent ddb33a5 commit 1470524

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

test/visual/control_rendering.js

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,33 @@
300300
fabricClass: 'Canvas',
301301
});
302302

303+
function controlboxFlippedXInGroup(canvas, callback) {
304+
var rect = new fabric.Rect({
305+
width: 90, height: 90, padding: 9, angle: 0, flipX: true,
306+
cornerSize: 12, cornerColor: 'green', cornerStrokeColor: 'blue',
307+
transparentCorners: false, borderScaleFactor: 3,
308+
fill: 'red', top: 50, left: 35,
309+
});
310+
var group = new fabric.Group([rect], {
311+
interactive: true,
312+
subTargetCheck: true,
313+
});
314+
canvas.add(group);
315+
canvas.setActiveObject(rect);
316+
canvas.renderAll();
317+
callback(canvas.lowerCanvasEl);
318+
}
319+
320+
tests.push({
321+
test: 'controlbox with flipped X in group',
322+
code: controlboxFlippedXInGroup,
323+
golden: 'controls11group.png',
324+
percentage: 0.004,
325+
width: 150,
326+
height: 180,
327+
fabricClass: 'Canvas',
328+
});
329+
303330
function controlboxOpacitySingle(canvas, callback) {
304331
var rect = new fabric.Rect({
305332
width: 90, height: 90, padding: 3, opacity: 0.4,
1.12 KB
Loading

0 commit comments

Comments
 (0)