svnno****@sourc*****
svnno****@sourc*****
2009年 10月 2日 (金) 21:42:59 JST
Revision: 1305 http://sourceforge.jp/projects/sie/svn/view?view=rev&revision=1305 Author: dhrname Date: 2009-10-02 21:42:59 +0900 (Fri, 02 Oct 2009) Log Message: ----------- Modified Paths: -------------- branches/DOM/org/w3c/dom/svg.js Modified: branches/DOM/org/w3c/dom/svg.js =================================================================== --- branches/DOM/org/w3c/dom/svg.js 2009-10-02 12:30:38 UTC (rev 1304) +++ branches/DOM/org/w3c/dom/svg.js 2009-10-02 12:42:59 UTC (rev 1305) @@ -1275,8 +1275,8 @@ /*interface SVGLocatable*/ /*SVGRect*/ SVGElement.prototype.getBBox = function(){ var s = new SVGRect(); - s.x = this.tar.style.left; - s.y = this.tar.style.top; + s.x = this.tar.clientLeft; + s.y = this.tar.clientTop; s.width = this.tar.clientWidth; s.height = this.tar.clientHeight; return s; @@ -1296,7 +1296,8 @@ return (this.viewportElement.getCTM()); }; /*getTransformToElementメソッド - *これは、elementへの変換行列を計算して返す + *これは、あるelementへの変換行列を計算して返す + *たとえば、親要素から子要素への変換行列を算出することが可能 */ /*SVGMatrix*/ SVGElement.prototype.getTransformToElement = function(/*SVGElement*/ element ){ var s = this.getCTM().inverse().multiply(element.getCTM()); @@ -1803,7 +1804,8 @@ this.children = []; //子要素 var sw = this.width.baseVal.value, sh = this.height.baseVal.value; this.currentView.read(); - this.transform._matrix = this.currentView.set(w, h, this.tarParent); //this.transform._matrixを加工する + this.currentView.set(w, h, this.tarParent); + this.transform._matrix = this.currentView.transform.cosolidate(); //this.transform._matrixを加工する this.chset(this,tar, this.transform._matirx, sw, sh); var backr = document.createElement("v:rect"); //背景の作成 backr.style.position = "absolute"; @@ -1988,6 +1990,7 @@ this._tx = this._ty = 0; var s = this.transform.createSVGTransformFromMatrix((new SVGMatrix(1, 0, 0, 1, 0, 0))); this.transform.appendItem(s); + return; } var vbx = vB.x, vby = vB.y, vbw = vB.width, vbh = vB.height; var rw = vw / vbw, rh = vh / vbh;