svnno****@sourc*****
svnno****@sourc*****
2011年 3月 21日 (月) 20:12:45 JST
Revision: 2494 http://sourceforge.jp/projects/sie/svn/view?view=rev&revision=2494 Author: dhrname Date: 2011-03-21 20:12:45 +0900 (Mon, 21 Mar 2011) Log Message: ----------- SVGSVGElementのvar文を整理 Modified Paths: -------------- branches/07x/073/org/w3c/dom/svg.js Modified: branches/07x/073/org/w3c/dom/svg.js =================================================================== --- branches/07x/073/org/w3c/dom/svg.js 2011-03-21 11:07:50 UTC (rev 2493) +++ branches/07x/073/org/w3c/dom/svg.js 2011-03-21 11:12:45 UTC (rev 2494) @@ -1151,10 +1151,7 @@ } var tar = evt.target, name = evt.attrName, - tv, - ovb, - par, - tp; + tv, ovb, par, tp, sa, mos; if (name === "viewBox") { tar._cacheScreenCTM = null; tv = tar.viewBox.baseVal; @@ -1168,7 +1165,8 @@ tar._cacheScreenCTM = null; par = evt.newValue; tp = tar.preserveAspectRatio.baseVal; - var sa = 1, mos = SVGPreserveAspectRatio.SVG_MEETORSLICE_UNKNOWN; + sa = 1; + mos = SVGPreserveAspectRatio.SVG_MEETORSLICE_UNKNOWN; if (!!par.match(/x(Min|Mid|Max)Y(Min|Mid|Max)(?:\s+(meet|slice))?/)) { switch (RegExp.$1) { case "Min": @@ -1205,14 +1203,15 @@ } else if (name === "height") { tar.viewport.height = tar.height.baseVal.value; } - evt = name = null; + evt = name = tv = ovb = par = tp = sa = mos = null; }, false); this.addEventListener("SVGLoad", function(evt){ evt.target.addEventListener("DOMAttrModified", function(evt){ if (evt.eventPhase === Event.BUBBLING_PHASE) { - var tar = evt.target; + var tar = evt.target, + evtt; if (tar.parentNode) { - var evtt = tar.ownerDocument.createEvent("MutationEvents"); + evtt = tar.ownerDocument.createEvent("MutationEvents"); evtt.initMutationEvent("DOMNodeInsertedIntoDocument", false, false, null, null, null, null, null); evtt.target = tar; evtt.eventPhase = Event.AT_TARGET; @@ -1254,16 +1253,14 @@ return s; }; /*SVGPoint*/ SVGSVGElement.prototype.createSVGPoint = function(){ - var s = new SVGPoint(); - return s; + return new SVGPoint(); }; /*SVGMatrix*/ SVGSVGElement.prototype.createSVGMatrix = function(){ - var s = new SVGMatrix(); //単位行列を作成 - return s; + //単位行列を作成 + return new SVGMatrix(); }; /*SVGRect*/ SVGSVGElement.prototype.createSVGRect = function(){ - var s = new SVGRect(); - return s; + return new SVGRect(); }; /*SVGTransform*/ SVGSVGElement.prototype.createSVGTransform = function(){ var s = this.createSVGTransformFromMatrix(this.createSVGMatrix());