svnno****@sourc*****
svnno****@sourc*****
2009年 10月 2日 (金) 21:30:39 JST
Revision: 1304
http://sourceforge.jp/projects/sie/svn/view?view=rev&revision=1304
Author: dhrname
Date: 2009-10-02 21:30:38 +0900 (Fri, 02 Oct 2009)
Log Message:
-----------
SVGViewSpecオブジェクトの修正
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-09-30 12:45:12 UTC (rev 1303)
+++ branches/DOM/org/w3c/dom/svg.js 2009-10-02 12:30:38 UTC (rev 1304)
@@ -1259,7 +1259,7 @@
SVGElement.constructor = Element;
SVGElement.prototype = new Element();
/*getPresentationAttribute
- *プレゼンテーション属性の値を得る。これはCSSのスタイルの設定値を定めるときや、内部の動的処理に役立つ
+ *プレゼンテーション属性の値をCSSValueとして得る。これはCSSのスタイルの設定値を定めるときや、内部の動的処理に役立つ
*/
/*css::CSSValue*/ SVGElement.prototype.getPresentationAttribute = function(/*DOMString*/ name ) {
var s = new CSSValue(), tgn = this.attributes.getNamedItemNS(null, name);
@@ -1921,20 +1921,20 @@
/*readonly SVGAnimatedPreserveAspectRatio*/ this.preserveAspectRatio = new SVGAnimatedPreserveAspectRatio();
return this;
};
-function SVGViewSpec() {
+function SVGViewSpec(ele) {
SVGFitToViewBox.apply(this, arguments);
- /*readonly SVGTransformList*/ this.transform = null;
- /*readonly SVGElement*/ this.viewTarget = null;
+ /*readonly SVGTransformList*/ this.transform = new SVGTransformList();
+ /*readonly SVGElement*/ this.viewTarget = ele;
/*readonly DOMString*/ this.viewBoxString = "";
/*readonly DOMString*/ this.preserveAspectRatioString = "";
/*readonly DOMString*/ this.transformString = "";
/*readonly DOMString*/ this.viewTargetString = "";
+ this.tar = ele;
return this;
};
SVGViewSpec.constructor = SVGFitToViewBox;
SVGViewSpec.prototype = new SVGFitToViewBox();
SVGViewSpec.prototype.read = function(){
- this.tar = ele;
var vb = this.viewBoxString;
if (vb) {
var ovb = vb.replace(/^\s+|\s+$/g, "").split(/[\s,]+/);
@@ -1986,7 +1986,8 @@
try {
if (!this.viewBoxString) {
this._tx = this._ty = 0;
- return new SVGMatrix(1, 0, 0, 1, 0, 0);
+ var s = this.transform.createSVGTransformFromMatrix((new SVGMatrix(1, 0, 0, 1, 0, 0)));
+ this.transform.appendItem(s);
}
var vbx = vB.x, vby = vB.y, vbw = vB.width, vbh = vB.height;
var rw = vw / vbw, rh = vh / vbh;
@@ -2035,8 +2036,8 @@
this._ty = ty;
ttps.marginLeft = this._tx+ "px";
ttps.marginTop = this._ty+ "px";
- var m = new SVGMatrix(xr, 0, 0, yr, 0, 0);
- return m;
+ var s = this.transform.createSVGTransformFromMatrix((new SVGMatrix(xr, 0, 0, yr, 0, 0)));
+ this.transform.appendItem(s);
} catch(e) {stlog.add(e,1031);}}