svnno****@sourc*****
svnno****@sourc*****
2009年 10月 4日 (日) 21:47:28 JST
Revision: 1312
http://sourceforge.jp/projects/sie/svn/view?view=rev&revision=1312
Author: dhrname
Date: 2009-10-04 21:47:28 +0900 (Sun, 04 Oct 2009)
Log Message:
-----------
SVGPathElementの修正
Modified Paths:
--------------
branches/DOM/org/w3c/dom/svg.js
Modified: branches/DOM/org/w3c/dom/svg.js
===================================================================
--- branches/DOM/org/w3c/dom/svg.js 2009-10-03 14:15:52 UTC (rev 1311)
+++ branches/DOM/org/w3c/dom/svg.js 2009-10-04 12:47:28 UTC (rev 1312)
@@ -2640,16 +2640,13 @@
SVGPathElement.constructor = SVGElement;
SVGPathElement.prototype = new SVGElement();
SVGPathElement.prototype.read = function(){
- this.d = this.getNamedItemNS(null, "d").nodeValue;
+ this.d = this.getNamedItemNS(null, "d");
};
-//あらかじめ正規表現オブジェクトを生成しておく
-NAIBU.comaR = /[A-Za-z]+(?=\s*\()/g;
-NAIBU.degR = /[\-\d\.e]+/g;
SVGPathElement.prototype.set = function( /*float*/ w, /*float*/ h) {
var dat = "";
try {
- var dd = this.d
+ var dd = this.d.nodeValue
.replace(/\s*([A-DF-Z])/gi, '],["$1" ') //convert to JSON array
.replace(/^\],/, "[")
.replace(/\s*$/, "]]")
@@ -2740,8 +2737,7 @@
var ele = this.tar;
ele.path = dat + " e";
ele.coordsize = w + " " + h;
- this.paint.set(w, h, this.transformable);
- ttm = this.transformable = this.paint = this.d = preCom = x = y = x0 = y0 = dx = dy = tma = tmb = tmc = tmd = tme = tmf = w = h = null;
+ ttm = preCom = x = y = x0 = y0 = dx = dy = tma = tmb = tmc = tmd = tme = tmf = w = h = null;
} catch(e) {stlog.add(e,372);}
};