Fix bug when text objects were rendered with blue background when part of the selection.

This commit is contained in:
kangax 2011-08-02 18:15:20 -04:00
parent 9690f0849e
commit b9dcfcf2c8
4 changed files with 14 additions and 6 deletions

View file

@ -1,3 +1,3 @@
/*! Fabric.js Copyright 2008-2011, Bitsonnet (Juriy Zaytsev, Maxim Chernyak) */
var fabric = fabric || { version: "0.4.10" };
var fabric = fabric || { version: "0.4.11" };

10
dist/all.js vendored
View file

@ -1,6 +1,6 @@
/*! Fabric.js Copyright 2008-2011, Bitsonnet (Juriy Zaytsev, Maxim Chernyak) */
var fabric = fabric || { version: "0.4.10" };
var fabric = fabric || { version: "0.4.11" };
(function(){
var view = document.defaultView;
@ -765,6 +765,7 @@ Cufon.registerEngine('canvas', (function() {
function renderBackground() {
g.save();
g.fillStyle = options.backgroundColor;
var left = 0, lineNum = 0;
@ -918,7 +919,9 @@ Cufon.registerEngine('canvas', (function() {
}
g.save();
renderBackground();
if (options.backgroundColor) {
renderBackground();
}
renderText();
g.restore();
g.restore();
@ -9836,7 +9839,8 @@ fabric.util.object.extend(fabric.Canvas.prototype, {
*/
fabric.Group.fromObject = function(object) {
return new fabric.Group(object.objects, object);
}
};
})(this);
(function(global) {

View file

@ -790,6 +790,7 @@ Cufon.registerEngine('canvas', (function() {
function renderBackground() {
g.save();
g.fillStyle = options.backgroundColor;
var left = 0, lineNum = 0;
@ -947,7 +948,9 @@ Cufon.registerEngine('canvas', (function() {
}
g.save();
renderBackground();
if (options.backgroundColor) {
renderBackground();
}
renderText();
g.restore();
g.restore();

View file

@ -456,5 +456,6 @@
*/
fabric.Group.fromObject = function(object) {
return new fabric.Group(object.objects, object);
}
};
})(this);