svnno****@sourc*****
svnno****@sourc*****
2010年 12月 3日 (金) 22:25:11 JST
Revision: 2200
http://sourceforge.jp/projects/sie/svn/view?view=rev&revision=2200
Author: dhrname
Date: 2010-12-03 22:25:11 +0900 (Fri, 03 Dec 2010)
Log Message:
-----------
1, GetSVGDocumentの変数の整理
2, SVGPointのプロパティの整理
Modified Paths:
--------------
branches/06x/065/org/w3c/dom/svg.js
Modified: branches/06x/065/org/w3c/dom/svg.js
===================================================================
--- branches/06x/065/org/w3c/dom/svg.js 2010-12-02 10:29:18 UTC (rev 2199)
+++ branches/06x/065/org/w3c/dom/svg.js 2010-12-03 13:25:11 UTC (rev 2200)
@@ -1519,6 +1519,7 @@
/*responseXMLを使うと、時々、空のデータを返すことがあるため(原因は不明)、
*ここでは、responseTextを用いる
*/
+ var dsd = new Date();
str = this.xmlhttp.responseText;
NAIBU.doc.async = false;
/*下記のプロパティについては、Microsoftのサイトを参照
@@ -1555,13 +1556,13 @@
tmp = null;
}
var s = DOMImplementation.createDocument("http://www.w3.org/2000/svg", "svg");
- var tar = s.documentElement;
- tar.viewport.top = 0;
- tar.viewport.left = 0;
- tar.viewport.width = objei.clientWidth;
- tar.viewport.height = objei.clientHeight;
- if (tar.viewport.height < 24) { //IEの標準モードではclientHeightプロパティの値が小さくなることがある
- tar.viewport.height = screen.width;
+ var tar = s.documentElement, tview = tar.viewport;
+ tview.top = 0;
+ tview.left = 0;
+ tview.width = objei.clientWidth;
+ tview.height = objei.clientHeight;
+ if (tview.height < 24) { //IEの標準モードではclientHeightプロパティの値が小さくなることがある
+ tview.height = screen.width;
}
var objw = objei.getAttribute("width"), objh = objei.getAttribute("height");
if (objw) {
@@ -1579,10 +1580,9 @@
}
str = attr = null;
var sdt = tar._tar, sp = document.createElement("div"), dcp = document.createElement("v:group");
- var view = tar.viewport;
- dcp.style.width = view.width+ "px";
- dcp.style.height = view.height+ "px";
- dcp.coordsize = view.width+ " " +view.height;
+ dcp.style.width = tview.width+ "px";
+ dcp.style.height = tview.height+ "px";
+ dcp.coordsize = tview.width+ " " +tview.height;
sp.appendChild(dcp);
objei.parentNode.insertBefore(sp, objei);
dcp.appendChild(sdt)
@@ -1596,7 +1596,7 @@
*作り出す作業を行う。これは必須
*/
var backr = document.createElement("v:rect");
- var w = tar.viewport.width, h = tar.viewport.height, sw = tar.width.baseVal.value, sh = tar.height.baseVal.value;
+ var w = tview.width, h = tview.height, sw = tar.width.baseVal.value, sh = tar.height.baseVal.value;
backr.style.position = "absolute";
backr.style.width = w+ "px";
backr.style.height = h+ "px";
@@ -1657,6 +1657,7 @@
s = evt = null;
/*IEのメモリリーク対策として、空関数を入力*/
this.xmlhttp.onreadystatechange = NAIBU.emptyFunction;
+ alert(+(new Date()) - dsd.getTime())
if (this._next) {
this._next._init();
} else {
@@ -1692,10 +1693,9 @@
*2次元座標の点(x,y)を表すオブジェクト
*/
function SVGPoint() {
- /*float*/ this.x = 0;
- /*float*/ this.y = 0;
return this;
};
+/*float*/SVGPoint.prototype.x = SVGPoint.prototype.y = 0;
SVGPoint.prototype.matrixTransform = function(/*SVGMatrix*/ matrix ) {
/*整数にしているのは、VMLの設計上、小数点を扱えないときがあるため*/
var x = parseInt(matrix.a * this.x + matrix.c * this.y + matrix.e);