Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

- manually implemented fixes from http://github.com/calyptus/art

  • Loading branch information...
commit 00731ac981791d2d432b44d48abffbbc8cbdc1fd 1 parent 9d9ec54
@kamicane authored
Showing with 13 additions and 6 deletions.
  1. +1 −1  Source/ART.Path.js
  2. +4 −3 Source/ART.SVG.js
  3. +8 −2 Source/ART.VML.js
View
2  Source/ART.Path.js
@@ -153,7 +153,7 @@ function visitArc(rx, ry, rotation, large, clockwise, x, y, tX, tY, curveTo, arc
var n = Math.ceil(Math.abs(arc / (circle / 4))),
step = arc / n,
- k = (4 / 3) * Math.tan(step / 4),
+ k = (4 / 3) * Math.tan(step / 4);
a = sa;
x = Math.cos(a); y = Math.sin(a);
View
7 Source/ART.SVG.js
@@ -159,7 +159,7 @@ ART.SVG.Base = new Class({
_injectBrush: function(type){
if (!this.container) return;
- var brush = this[type + 'Brush'];
+ var brush = (type == 'fill') ? this.fillBrush : this.strokeBrush;
if (brush) this.container.defs.appendChild(brush);
},
@@ -175,9 +175,10 @@ ART.SVG.Base = new Class({
this._ejectBrush(type);
var brush = createElement(tag);
- this[type + 'Brush'] = brush;
+ if (type == 'fill') this.fillBrush = brush;
+ else this.strokeBrush = brush;
- var id = type + '-brush-e' + this.uid;
+ var id = type + '-brush-e' + String.uniqueID();
brush.setAttribute('id', id);
this._injectBrush(type);
View
10 Source/ART.VML.js
@@ -29,6 +29,12 @@ ART.VML = new Class({
if (width != null && height != null) this.resize(width, height);
},
+ eject: function(){
+ var element = this.vml, parent = element.parentNode;
+ if (parent) parent.removeChild(element);
+ return this;
+ },
+
inject: function(element){
if (element.element) element = element.element;
element.appendChild(this.vml);
@@ -304,7 +310,7 @@ ART.VML.Base = new Class({
if (strokeWidth){
// Scale is the hypothenus between the two vectors
// TODO: Use area calculation instead
- var vx = m.xx + m.xy, vy = m.yy + m.yx;
+ vx = m.xx + m.xy; vy = m.yy + m.yx;
strokeWidth *= Math.sqrt(vx * vx + vy * vy) / Math.sqrt(2);
}
@@ -546,7 +552,7 @@ ART.VML.Shape = new Class({
var vml = this._vml || '';
this._prefix = prefix;
- this._suffix = suffix
+ this._suffix = suffix;
if (prefix){
vml = [
prefix, vml, suffix,
Please sign in to comment.
Something went wrong with that request. Please try again.