Skip to content

Commit

Permalink
Committing in fixes for duplicating path information during serializa…
Browse files Browse the repository at this point in the history
…tion/deserialization of a VML surface.

Squashed commit of the following:

commit 7c87313
Author: Jared Jurkiewicz <jared.jurkiewicz@gmail.com>
Date:   Mon Jul 28 11:09:12 2014 -0400

    Fix patth repeated duplication error in VML renderer, fixes #16830
  • Loading branch information
Kagetsume committed Jul 28, 2014
1 parent 91883e3 commit cacc09e
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
4 changes: 4 additions & 0 deletions gfx/utils.js
Expand Up @@ -309,6 +309,10 @@ define(["dojo/_base/kernel","dojo/_base/lang","./_base", "dojo/_base/html","dojo
svg = svg.replace(/\bdojoGfx\w*\s*=\s*(['"])\w*\1/g, "");
svg = svg.replace(/\b__gfxObject__\s*=\s*(['"])\w*\1/g, "");
svg = svg.replace(/[=]([^"']+?)(\s|>)/g,'="$1"$2');

// Undefined strokes (IE 8 seralization weirdness) should be removed to
// allow default. 'undefined' is not a valid value.
svg = svg.replace(/\bstroke-opacity\w*\s*=\s*(['"])undefined\1/g, "");
}
return svg; //Cleaned SVG text.
}
Expand Down
16 changes: 15 additions & 1 deletion gfx/vml.js
Expand Up @@ -1022,7 +1022,21 @@ function(lang, declare, arr, Color, has, config, dom, domGeom, kernel, g, gs, pa
_closePath: function(){
this.lastControl.type = ""; // no control point after this primitive
return ["x"];
}
},
_getRealBBox: function(){
// summary:
// returns an array of four points or null
// This is called by setFill, which actually creates the path, so we want to avoid
// duping the path repeatedly in the shape by clearing the path before re-add.
this._confirmSegmented();
if(this.tbbox){
return this.tbbox; // Array
}
if(typeof this.shape.path == "string"){
this.shape.path = "";
}
return this.inherited(arguments);
}
});
vml.Path.nodeType = "shape";

Expand Down

0 comments on commit cacc09e

Please sign in to comment.