svnno****@sourc*****
svnno****@sourc*****
2009年 10月 24日 (土) 19:44:16 JST
Revision: 1357 http://sourceforge.jp/projects/sie/svn/view?view=rev&revision=1357 Author: dhrname Date: 2009-10-24 19:44:15 +0900 (Sat, 24 Oct 2009) Log Message: ----------- 関数の最後にセミコロンを付けるようにした Modified Paths: -------------- branches/05x/053/sie.js Modified: branches/05x/053/sie.js =================================================================== --- branches/05x/053/sie.js 2009-10-24 10:36:50 UTC (rev 1356) +++ branches/05x/053/sie.js 2009-10-24 10:44:15 UTC (rev 1357) @@ -120,7 +120,7 @@ } else { window['on'+evt] = lis; } -} +}; NAIBU.addEvent("load",svgtovml); NAIBU.addEvent("unload",unsvgtovml); @@ -138,7 +138,7 @@ if (this.jo) { this.p.innerHTML += "<p>"+code+":"+e.message+"</p>"; } -} +}; //SVGtoVML 本体。SVGDocumentの代わりを担う //object要素の幅と高さがwとh(単位はpxに統一)。svg要素の幅と高さがswi.valueとshi.value。svg要素にwidth属性が指定されていない場合、swi.value=wである。 @@ -156,7 +156,7 @@ var mat = this.vi.set(sw, sh, ob); //返り値はMatrix型 this.chset(this.rootElement, mat, sw, sh); } catch(n) {stlog.add(n,109);} -} +}; SVGtoVML.prototype.getObject = function stvgetob( /*string*/ tag, /*object*/ st, /*string*/nodes, /*float*/w, h) { try { var li = this.rootElement.getElementsByTagName(tag); @@ -167,7 +167,7 @@ this[nodes] = la; li = null; } catch(e) {stlog.add(e,129);} -} +}; SVGtoVML.prototype.set = function stvset(ob) { var w = this.w, h = this.h, c = this.children; var sw = this.swi.value, sh = this.shi.value; @@ -221,14 +221,14 @@ } } } catch(e) {stlog.add(e,138);} -} +}; SVGtoVML.prototype.setObject = function stvsetob( /*SVGElement*/ arr, /*float*/ sw, /*float*/ sh) { try { for (var i=0,arri=arr.length;i<arri;++i) { arr[i].set(sw,sh); } } catch(e) {stlog.add(e,170);} -} +}; //chset childNodesで要素を作成していく SVGtoVML.prototype.chset = function _s_chset( /*element*/ ele, /*Matrix*/ matrix, /*float*/w, /*float*/h){ @@ -294,7 +294,7 @@ } while (te); } nods = name = gname = matrix = cmatrix = w = h = null; -} +}; //object要素とembed要素の取得を総括して行う function Objectembeds(){ @@ -320,7 +320,7 @@ } else { //全要素の読み込みが終われば } } catch(e) {stlog.add(e,293);this.onumber++;this.next();} -} +}; //embed要素をobject要素に変える(Firefoxのみ) Objectembeds.prototype.ffnext = function(){ try{ @@ -335,7 +335,7 @@ teli--; } } catch(e) {stlog.add(e,294);} -} +}; //g要素の処理 function STGroupElement( /*element*/ g, /*Matrix*/ matrix, /*float*/w, h) { @@ -353,7 +353,7 @@ try{ stvsetob(this.children,sw,sh); this.children = this.transformable = null; - } catch(e){stlog.addd(e,3145)} + } catch(e){stlog.addd(e,3145);} }; STGroupElement.prototype.chset = SVGtoVML.prototype.chset; @@ -379,7 +379,7 @@ txts.top = "0px"; txts.textDecoration = "none"; } catch(e) {stlog.add(e,204);} -} +}; //text要素の処理 function STText( /*element*/ te, /*Matrix*/ matrix, /*float*/w, h) { @@ -469,7 +469,7 @@ } catch(e) {stlog.add(e,2831);} p = ptm = tancx = tancy = null; this.textLength = textLength; -} +}; //fontset フォントの大きさを幅と高さを使ってpx単位に変換 function fontset( /*float*/ f, /*float*/ w, /*float*/ h, /*Matrix*/ ttm) { try { @@ -509,9 +509,9 @@ } p = ptm = w = h = null; //ずれの値を返す - return {dx : parseFloat(tts.left), dy : parseFloat(tts.top)} + return {dx : parseFloat(tts.left), dy : parseFloat(tts.top)}; } catch(e) {stlog.add(e,304);} -} +}; //line要素の処理 function STLine( /*element*/ li, /*Matrix*/ matrix, /*float*/w, h) { @@ -537,7 +537,7 @@ this.paint.set(w, h, ttm); list = pl = plm = dat = this.paint = ttm = this.transformable = w = h = null; } catch(e) {stlog.add(e,257);} -} +}; //path要素の処理 function STPath( /*element*/ ele, /*Matrix*/ matrix) { @@ -655,7 +655,7 @@ x = x2; y = y2; } return F; -} +}; //前回の座標を反転させる。それを挿入 NAIBU.nst = function ( /*int*/ skip, /*Array*/ F, /*float*/ x1, /*float*/ y1) { @@ -666,7 +666,7 @@ F.splice(i, 0, x1, y1); } return F; -} +}; //相対座標を絶対座標に変換 NAIBU.reltoabs = function (/*float*/ x, /*float*/ y, /*Array*/ F) { @@ -683,7 +683,7 @@ } } return F; -} +}; //polygon要素を処理 function STPolygon( /*element*/ ele, /*Matrix*/ matrix) { @@ -709,7 +709,7 @@ ele.coordsize = w + " " + h; this.paint.set(w, h, ttm); } catch(e) {stlog.add(e,406);} -} +}; //polyline要素を処理 function STPolyline( /*element*/ ele, /*Matrix*/ matrix) { @@ -735,7 +735,7 @@ ele.coordsize = w + " " + h; this.paint.set(w, h, ttm); } catch(e) {stlog.add(e,440);} -} +}; //circle要素を処理 function STCircle( /*element*/ ele, /*Matrix*/ matrix, /*float*/w, h) { @@ -769,7 +769,7 @@ this.paint.set(w, h, ttm); dat = list = pl = plm = this.paint = ttm = this.transformable = w = h = null; //解放 } catch(e) {stlog.add(e,479);} -} +}; //ellipse要素を処理 function STEllipse( /*element*/ ele, /*Matrix*/ matrix, /*float*/w, h) { @@ -803,7 +803,7 @@ this.paint.set(w, h, ttm); dat = list = pl = plm = this.paint = ttm = this.transformable = w = h = null; //解放 } catch(e) {stlog.add(e,519);} -} +}; //rect要素を処理 function STRectElement( /*element*/ rect, /*Matrix*/ matrix, /*float*/ w, h) { @@ -854,7 +854,7 @@ this.paint.set(w, h, ttm); dat = list = pl = plm = this.paint = ttm = this.transformable = w = h = null; //解放 } catch(ee) {stlog.add(ee,576);} -} +}; //image要素の処理 function STImage( /*element*/ ele, /*Matrix*/ matrix, /*float*/w, h){ @@ -867,7 +867,7 @@ this.xlink = new NAIBU.XLink(ele); this.paint = new NAIBU.PaintColor(ele); this.transformable = NAIBU.transformToCTM(ele,matrix); - w = h = null + w = h = null; return this; } STImage.prototype.set = function imagesets(w,h){ @@ -896,13 +896,13 @@ this.xlink.set(); dat = pt = this.xlink = this.paint = ttm = this.transformable = w = h = null; //解放 } catch(e) {stlog.set(e,21896);} -} +}; /*use要素の処理*/ function STUseElement( /*element*/ ele, /*float*/w, h){ this.tar = ele; var tns = ele.nextSibling; - tns.setAttribute("xlink:show", "embed") + tns.setAttribute("xlink:show", "embed"); this.x = new STLength((tns.getAttribute("x") || 0), w); this.y = new STLength((tns.getAttribute("y") || 0), h); this.width = new STLength(tns.getAttribute("svgwidth"), w); @@ -923,7 +923,7 @@ this.paint.setStyle(); this.paint = this.xlink = null; } catch(e) {stlog.add(e,85436);} -} +}; //色のキーワード //PaintColor 色、線などをすべてコントロール @@ -1002,7 +1002,7 @@ //内部プロパティを、styleに設定する NAIBU.PaintColor.prototype.setStyle = function() { try { - var tst = this.tar + var tst = this.tar; for (var i in this) { if ((typeof this[i]) === "string") { //string型以外は除く tst.style[i] = this[i]; @@ -1359,7 +1359,7 @@ td["text-anchor"] = "start"; NAIBU.PaintColor.apply(this,arguments); return this; -} +}; NAIBU.FontStyle.prototype = new NAIBU.PaintColor(false); //キャッシュ用 NAIBU.FontStyle.prototype.cache = {}; @@ -1377,12 +1377,12 @@ } } catch(e){stlog.add(e,1179);} return cache[id]; -} +}; //内部プロパティを、styleに設定する NAIBU.FontStyle.prototype.setStyle = function() { try { - var tst = this.tar + var tst = this.tar; for (var i in this) { var ti = this[i]; if ((typeof ti) === "string") { //string型以外は除く @@ -1396,7 +1396,7 @@ } } } catch(e) {stlog.add(e,1396); return "";} -} +}; NAIBU.FontStyle.prototype.fset = function( /*float*/ w, /*float*/ h, /*Matrix*/ matrix) { try{ this.setStyle(); @@ -1411,9 +1411,9 @@ this.writingMode = tts.writingMode; tts.marginTop = (this.writingMode === "tb-rl") ? "0px" : -parseFloat(tts.fontSize)+ "px"; tts.textIndent = "0px"; - tts.lineHeight = this.fontSize+ "px" + tts.lineHeight = this.fontSize+ "px"; } catch(e){stlog.add(e,1185);} -} +}; //NAIBU.transformToCTM transform属性を処理。Matrix型に変換 //あらかじめ正規表現オブジェクトを生成しておく @@ -1502,7 +1502,7 @@ } var s = new PList(F); return s; -} +}; //SVGMatrixを参照。行列 function Matrix(a,b,c,d,e,f) { //引数はすべてNumber型 @@ -1620,7 +1620,7 @@ var m = new Matrix(xr, 0, 0, yr, 0, 0); return m; } catch(e) {stlog.add(e,1031);} -} +}; //SVGRectを参照 function STRect(x,y,w,h) { //引数はすべてNumber型 @@ -1644,12 +1644,12 @@ s.D = plst.matrixTransform(matrix).list; plst = null; return s; -} +}; //2つの点から角度を算出 STArc.prototype.CVAngle = function starccvangle(ux,uy,vx,vy) { var rad = Math.atan2(vy, vx) - Math.atan2(uy, ux); return (rad >= 0) ? rad : 2 * Math.PI + rad; -} +}; //弧をベジェ曲線に変換 STArc.prototype.set = function starcset(x1,y1,rx,ry,psai,fA,fS,x4,y4) { var fS = parseFloat(fS), rx = parseFloat(rx), ry = parseFloat(ry), psai = parseFloat(psai), x1 = parseFloat(x1), x4 = parseFloat(x4), y1 = parseFloat(y1), y4 = parseFloat(y4); @@ -1710,14 +1710,14 @@ this.D = (this.D ? this.D.concat(nea) : nea); nea = null; return true; -} +}; //setをできるだけ繰り返す STArc.prototype.sset = function starcsset( /*float*/ nox, /*float*/ noy, /*array*/ f, /*float*/ rx, /*float*/ ry) { for (var i=1,fli=f.length;i<fli+1;i+=7){ this.set(nox,noy,f[i],f[i+1],f[i+2],f[i+3],f[i+4],f[i+5]+rx,f[i+6]+ry); nox = f[i+5]+rx; noy = f[i+6]+ry; } -} +}; //SVGLengthを参照 function STLength( /*string or number*/ d, /*float*/ wort, /*float*/ f) { @@ -1755,7 +1755,7 @@ "ex": 4, "px": 5, "%": 2 -} +}; STLength.prototype.newValueSpecifiedUnits = function ( /*number*/ ut, /*number*/ value) { this.unitType = ut; this.value = value * this._n[ut-1]; @@ -1802,7 +1802,7 @@ this.href = null; } return this; -} +}; NAIBU.XLink.prototype.set = function() { try { if (this.href) { @@ -1836,7 +1836,7 @@ } } } catch(e) {stlog.add(e,17155);} -} +}; function utf16( /*string*/ s) { return unescape(s); @@ -1977,7 +1977,7 @@ fn({success:true,content:xmlhttp.responseText,obj:ob,num:n}); xmlhttp = null; } - } + }; xmlhttp.send(null); } else { fn({success:false});