Fix text rendering in IE9. Now fully works! Fix fabric.Element#insertAt not calling setCoords and setupState on added object. This was affecting fabric.Element#loadFromJSON. Thanks vepkenez for bringing it up.

This commit is contained in:
kangax 2011-02-17 16:41:16 -05:00
parent 0180de0a70
commit d9828321ca
2 changed files with 7 additions and 0 deletions

5
dist/all.js vendored
View file

@ -1254,6 +1254,9 @@ Cufon.registerEngine('vml', (function() {
if (!document.namespaces) return;
var canvasEl = document.createElement('canvas');
if (canvasEl && canvasEl.getContext && canvasEl.getContext.apply) return;
if (document.namespaces.cvml == null) {
document.namespaces.add('cvml', 'urn:schemas-microsoft-com:vml');
}
@ -4900,6 +4903,8 @@ fabric.util.animate = animate;
*/
insertAt: function (object, index) {
this._objects.splice(index, 0, object);
this.stateful && object.setupState();
object.setCoords();
this.renderAll();
return this;
},

View file

@ -1157,6 +1157,8 @@
*/
insertAt: function (object, index) {
this._objects.splice(index, 0, object);
this.stateful && object.setupState();
object.setCoords();
this.renderAll();
return this;
},