diff --git a/dist/all.js b/dist/all.js index dc898598..1b04beb1 100644 --- a/dist/all.js +++ b/dist/all.js @@ -5018,8 +5018,6 @@ fabric.util.animate = animate; if (!allOnTop) { this.clearContext(containerCanvas); } - containerCanvas.fillStyle = this.backgroundColor; - containerCanvas.fillRect(0, 0, this.width, this.height); var length = this._objects.length, activeGroup = this.getActiveGroup(), @@ -5032,6 +5030,9 @@ fabric.util.animate = animate; containerCanvas.clip(); } + containerCanvas.fillStyle = this.backgroundColor; + containerCanvas.fillRect(0, 0, this.width, this.height); + if (length) { for (var i = 0; i < length; ++i) { if (!activeGroup || diff --git a/src/element.class.js b/src/element.class.js index ba95e031..58ff5606 100644 --- a/src/element.class.js +++ b/src/element.class.js @@ -1195,8 +1195,6 @@ if (!allOnTop) { this.clearContext(containerCanvas); } - containerCanvas.fillStyle = this.backgroundColor; - containerCanvas.fillRect(0, 0, this.width, this.height); var length = this._objects.length, activeGroup = this.getActiveGroup(), @@ -1209,6 +1207,9 @@ containerCanvas.clip(); } + containerCanvas.fillStyle = this.backgroundColor; + containerCanvas.fillRect(0, 0, this.width, this.height); + if (length) { for (var i = 0; i < length; ++i) { if (!activeGroup || diff --git a/test/benchmarks/animation.js b/test/benchmarks/animation.js index 32acdc5b..c1ff507a 100644 --- a/test/benchmarks/animation.js +++ b/test/benchmarks/animation.js @@ -102,13 +102,13 @@ loadSVGFromURL('../demo/assets/' + shapePath, function(objects, options) { var pathGroup = new fabric.PathGroup(objects, options); - pathGroup - .set('left', coords[i].x) - .set('top', coords[i].y) - .set('angle', 30) - .set('fill', '#ff5555') - .scale(scaleObjectEl.value) - .setCoords(); + pathGroup.set({ + left: coords[i].x, + top: coords[i].y, + angle: 30, + fill: '#ff5555' + }); + pathGroup.scale(scaleObjectEl.value).setCoords(); canvas.add(pathGroup); diff --git a/test/demo/demo.js b/test/demo/demo.js index aca4e525..821d4cdd 100644 --- a/test/demo/demo.js +++ b/test/demo/demo.js @@ -227,7 +227,7 @@ activeGroup = canvas.getActiveGroup(); if (activeObject || activeGroup) { - (activeObject || activeGroup).set('opacity', parseInt(this.value, 10) / 100); + (activeObject || activeGroup).setOpacity(parseInt(this.value, 10) / 100); canvas.renderAll(); } }; @@ -258,7 +258,7 @@ activeGroup = canvas.getActiveGroup(); if (activeObject || activeGroup) { - (activeObject || activeGroup).set('fill', this.value); + (activeObject || activeGroup).setFill(this.value); canvas.renderAll(); } };