[Sie-announce] SIEコード [1117] STViewSpecオブジェクトのsetメソッドにおいて、ttpsの値がなかったのを修正

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2009年 4月 3日 (金) 20:17:31 JST


Revision: 1117
          http://svn.sourceforge.jp/view?root=sie&view=rev&rev=1117
Author:   dhrname
Date:     2009-04-03 20:17:31 +0900 (Fri, 03 Apr 2009)

Log Message:
-----------
STViewSpecオブジェクトのsetメソッドにおいて、ttpsの値がなかったのを修正

Modified Paths:
--------------
    branches/04x/046/sie.js

Modified: branches/04x/046/sie.js
===================================================================
--- branches/04x/046/sie.js	2009-04-03 11:08:25 UTC (rev 1116)
+++ branches/04x/046/sie.js	2009-04-03 11:17:31 UTC (rev 1117)
@@ -148,14 +148,14 @@
   this.rootElement = obc; this.w = w; this.h = h; this.swi = swi; this.shi = shi;
   return this;
 }
-SVGtoVML.prototype.read = function stvread() {
+SVGtoVML.prototype.read = function stvread(/*element*/ ob) {
   this.rootElement.style.visibility = "hidden";
   this.vi = new STViewSpec(this.rootElement);
   try{
   this.children = []; //子要素
   var sw = this.swi.value,  sh = this.shi.value;
   this.getObject("USE", STUseElement, "use", sw, sh); //use要素を先に処理
-  var mat = this.vi.set(sw, sh); //返り値はMatrix型
+  var mat = this.vi.set(sw, sh, ob); //返り値はMatrix型
   this.chset(this.rootElement, mat, sw, sh);
   } catch(n) {stlog.add(n,109);}
 }
@@ -190,11 +190,9 @@
   //以下、画像を切り取り
   trstyle.overflow = "hidden";
   var backrs = backr.currentStyle;
-  var viewWidth = w > sw ? sw : w;
-  var viewHeight = h > sh ? sh : h;
+  var viewWidth = w > sw ? sw : w, viewHeight = h > sh ? sh : h;
   var bfl = parseFloat(backrs.left), bft = parseFloat(backrs.top);
-  var bl = -this.vi._tx
-  var bt = -this.vi._ty;
+  var bl = -this.vi._tx, bt = -this.vi._ty;
   if (bfl !== 0 && !isNaN(bfl)) { //内部の図形にずれが生じたとき(isNaNはIE8でautoがデフォルト値のため)
     bl = bfl;
     tpstyle.left = -bl+ "px";
@@ -1549,7 +1547,7 @@
   vb = par = null;
   return this;
 }
-STViewSpec.prototype.set = function vss( /*float*/ vw, /*float*/ vh) {
+STViewSpec.prototype.set = function vss( /*float*/ vw, /*float*/ vh, /*element*/ ob) {
   var vB = this.viewBox, par = this.preserveAspectRatio;
   try {
   if (!vB) {
@@ -1598,7 +1596,7 @@
       break;
     }
   }
-  var ttps =  this.tar.parentNode.style;
+  var ttps =  ob.style;
   this._tx = tx;
   this._ty = ty;
   ttps.marginLeft = this._tx+ "px";
@@ -1931,7 +1929,7 @@
   obj.parentNode.insertBefore(ob,obj);
   ob.outerHTML = ob.outerHTML //IE8の標準モード対策
   obc.outerHTML = obc.outerHTML //IE8の標準モード対策
-  STdocument[dn].read();
+  STdocument[dn].read(ob);
   STdocument[dn].set(ob);
   alert((new Date()).getTime() - dn.getTime());
   data = dc = null;




Sie-announce メーリングリストの案内
Back to archive index