svnno****@sourc*****
svnno****@sourc*****
2009年 12月 13日 (日) 23:04:35 JST
Revision: 1468 http://sourceforge.jp/projects/sie/svn/view?view=rev&revision=1468 Author: dhrname Date: 2009-12-13 23:04:35 +0900 (Sun, 13 Dec 2009) Log Message: ----------- Modified Paths: -------------- branches/05x/056/sie.js Modified: branches/05x/056/sie.js =================================================================== --- branches/05x/056/sie.js 2009-12-13 13:03:55 UTC (rev 1467) +++ branches/05x/056/sie.js 2009-12-13 14:04:35 UTC (rev 1468) @@ -2314,33 +2314,34 @@ } }; STSetElement.prototype.beginElement = function() { - var target = this.target; - var base = target[this.attributeName]; + var target = this.target, attrName = this.attributeName; + var base = target[attrName]; try { //fill要素とstroke要素はあらかじめ消しておく if ( !(target instanceof STGroupElement) ) { - var tgebtfill = target.tar.getElementsByTagName("fill"), tgebtstroke = target.tar.getElementsByTagName("stroke"); - if (tgebtfill.length > 0) { - target.tar.removeChild(tgebtfill[0]); - } - if (tgebtstroke.length > 0) { - target.tar.removeChild(tgebtstroke[0]); - } - } + var tart = target.tar; + var tgebtfill = tart.getElementsByTagName("fill"), tgebtstroke = tart.getElementsByTagName("stroke"); + if (tgebtfill.length > 0) { + tart.removeChild(tgebtfill[0]); + } + if (tgebtstroke.length > 0) { + tart.removeChild(tgebtstroke[0]); + } + } if (base !== void 0) { if (typeof base === "string") { - target[this.attributeName] = this.to; + target[attrName] = this.to; } else if (base instanceof STLength) { var s = base.value; base.newValueSpecifiedUnits(base.unitType, parseFloat(this.to)); base = s; } - } else if (target.paint.defaults[this.attributeName] !== void 0) { - base = target.paint[this.attributeName]; - target.paint[this.attributeName] = this.to; + } else if (target.paint.defaults[attrName] !== void 0) { + base = target.paint[attrName]; + target.paint[attrName] = this.to; } else { base = ""; - target.tar.style[this.attributeName] = this.to; + target.tar.style[attrName] = this.to; } target.set(this.w, this.h); target.transformable = this.trnasformable; @@ -2350,6 +2351,7 @@ if (this._end) { var offset = (this.simpleDuration > this._end - this._begin) ? this._end - this._begin : this.simpleDuration; this.endElementAt(offset); + offset = null; } else { this.endElementAt(this.simpleDuration); } @@ -2357,6 +2359,7 @@ } catch(e) { stlog.add(e, 23400); } + attrName = null; return; }; STSetElement.prototype.endElement = function() { @@ -2418,18 +2421,20 @@ }; _noie_STSetElement.prototype.beginElement = function() { try { - var target = this.target, base = target.getAttributeNS(null, this.attributeName) || target.style.getPropertyValue(this.attributeName); - target.setAttributeNS(null, this.attributeName, this.to); - target.style.setProperty(this.attributeName, this.to, ""); //第三引数に関しては、W3CやMDCを参照 + var target = this.target, attrName = this.attributeName, base = target.getAttributeNS(null, attrName) || target.style.getPropertyValue(attrName); + target.setAttributeNS(null, attrName, this.to); + target.style.setProperty(attrName, this.to, ""); //第三引数に関しては、W3CやMDCを参照 this.base = base; if (this.simpleDuration) { if (this._end) { var offset = (this.simpleDuration > this._end - this._begin) ? this._end - this._begin : this.simpleDuration; this.endElementAt(offset); + offset = null; } else { this.endElementAt(this.simpleDuration); } } + attrName = null; } catch(e) { stlog.add(e, 24370); }