svnno****@sourc*****
svnno****@sourc*****
2010年 1月 18日 (月) 23:04:48 JST
Revision: 1587 http://sourceforge.jp/projects/sie/svn/view?view=rev&revision=1587 Author: dhrname Date: 2010-01-18 23:04:48 +0900 (Mon, 18 Jan 2010) Log Message: ----------- 変数のブール値変換 Modified Paths: -------------- branches/05x/058/sie.js Modified: branches/05x/058/sie.js =================================================================== --- branches/05x/058/sie.js 2010-01-17 14:30:50 UTC (rev 1586) +++ branches/05x/058/sie.js 2010-01-18 14:04:48 UTC (rev 1587) @@ -1125,6 +1125,7 @@ cache[id] = new NAIBU.PaintColor(parent); } return cache[id]; + cache = id = null; } }; NAIBU.PaintColor.prototype.getAttribute = function( /*string*/ name) { @@ -1213,7 +1214,7 @@ strs[i] = Math.ceil(parseFloat(strs[i]) / parseFloat(this.strokewidth)); //精密ではないので注意 } this.strokedasharray = strs.join(" "); - if (strs.length % 2 == 1) { + if (strs.length % 2 === 1) { this.strokedasharray += " " + this.strokedasharray; } } @@ -1715,7 +1716,7 @@ } var par = ele.getAttribute("preserveAspectRatio") || "xMidYMid meet"; var sa = 1, mos = 0; - if (par.match(/x(Min|Mid|Max)Y(Min|Mid|Max)(?:\s+(meet|slice))?/)) { + if (!!par.match(/x(Min|Mid|Max)Y(Min|Mid|Max)(?:\s+(meet|slice))?/)) { switch (RegExp.$1) { case "Min": sa += 1; @@ -1918,7 +1919,7 @@ var v = parseFloat(d); var tani = d.match(this._dR); var ut = 1; - if (tani) { + if (!!tani) { ut = this._tani[tani]; } this.newValueSpecifiedUnits(ut,v); @@ -2043,7 +2044,7 @@ } catch (e) {stlog.add(e,1847);} }; function _ie_font(data) { - if (data.success) { + if (!!data.success) { //responsXMLはDTD処理を行う可能性があるため、ここでは使わない var doc = new ActiveXObject("MSXML2.DomDocument"); str = data.content.replace(/!DOCTYPE/,"!--").replace(/(dtd">|\]>)/,"-->"); @@ -2142,7 +2143,7 @@ } }; function _noie_font(data) { - if (data.success) { + if (!!data.success) { var doc = (new DOMParser()).parseFromString(data.content, "text/xml"); //getElementByIdは使えないので注意(DTDでの指定が必要) var font = doc.getElementsByTagNameNS(NAIBU.svgNameSpace, "font").item(0); @@ -2265,7 +2266,7 @@ }; NAIBU.Clip = []; function STSetElement(/*Element*/ ele, /*Matrix*/ matrix, /*float*/w, h) { - if (ele) { + if (!!ele) { var parent = ele.parentNode, s = {}; if (parent.nodeName === "shape") { switch (parent.getAttribute("tag")) { @@ -2466,7 +2467,7 @@ }; function _noie_STSetElement(/*Element*/ ele) { - if (ele) { + if (!!ele) { this.target = ele.parentNode; this.tar = ele; this.currentFrame = 0;