svnno****@sourc*****
svnno****@sourc*****
2009年 12月 7日 (月) 21:39:21 JST
Revision: 1448
http://sourceforge.jp/projects/sie/svn/view?view=rev&revision=1448
Author: dhrname
Date: 2009-12-07 21:39:20 +0900 (Mon, 07 Dec 2009)
Log Message:
-----------
set要素の実装
Modified Paths:
--------------
branches/05x/055/sie.js
Modified: branches/05x/055/sie.js
===================================================================
--- branches/05x/055/sie.js 2009-12-05 15:08:34 UTC (rev 1447)
+++ branches/05x/055/sie.js 2009-12-07 12:39:20 UTC (rev 1448)
@@ -2183,42 +2183,41 @@
};
NAIBU.Clip = [];
function STSetElement(/*Element*/ ele, /*Matrix*/ matrix, /*float*/w, h) {
- var parent = ele.parentNode, dummy = new Matrix(1, 0, 0, 1, 0, 0), s = {};
+ var parent = ele.parentNode, s = {};
if (parent.nodeName === "shape") {
switch (parent.getAttribute("tag")) {
case "path":
- s = new STPath(parent, dummy);
+ s = new STPath(parent, matrix);
break;
case "rect":
- s = new STRectElement(parent, dummy, w, h);
+ s = new STRectElement(parent, matrix, w, h);
break;
case "circle":
- s = new STCircle(parent, dummy, w, h);
+ s = new STCircle(parent, matrix, w, h);
break;
case "ellipse":
- s = new STEllipse(parent, dummy, w, h);
+ s = new STEllipse(parent, matrix, w, h);
break;
case "polyline":
- s = new STPolyline(parent, dummy);
+ s = new STPolyline(parent, matrix);
break;
case "polygon":
- s = new STPolygon(parent, dummy);
+ s = new STPolygon(parent, matrix);
break;
case "line":
- s = new STLine(parent, dummy, w, h);
+ s = new STLine(parent, matrix, w, h);
break;
}
} else if (parent.nodeName === "DIV") {
- s = new STText(parent, dummy, w, h);
+ s = new STText(parent, matrix, w, h);
} else if (parent.nodeName === "A") {
- s = new STAElement(parent, dummy);
+ s = new STAElement(parent, matrix);
} else if (parent.nodeName === "image") {
- s = new STImage(parent, dummy, w, h);
+ s = new STImage(parent, matrix, w, h);
}
- s.transformable = matrix;
+ this.trnasformable = s.transformable;
this.target = s;
this.tar = ele;
- this.transformable = matrix;
this.paint = s.paint;
this.currentFrame = 0;
this.attributeName = ele.getAttribute("attributeName").replace(/(fill|stroke)\-/, "&1");
@@ -2229,7 +2228,6 @@
this.w = w;
this.h = h;
this._begin = this._end = this.simpleDuration = null;
- dummy = null;
NAIBU.Clip[NAIBU.Clip.length] = this;
return this;
};
@@ -2247,7 +2245,7 @@
tar = this.tarrget.tar;
}
var tea = this.beginElementAt;
- tar.attachEvent( "on" + this.begin.match(/(mouse|activ|clic)[a-z]+/i), (function(){tea(offset)}) );
+ tar.attachEvent( "on" + this.begin.match(/(mouse|activ|clic)[a-z]+/), (function(){tea(offset)}) );
} else {
this.beginElementAt(offset);
beginOffset = offset;
@@ -2267,7 +2265,7 @@
tar = this.tarrget.tar;
}
var tea = this.endElementAt;
- tar.attachEvent( "on" + this.end.match(/(mouse|activ|clic)[a-z]+/i), (function(){tea(offset)}) );
+ tar.attachEvent( "on" + this.end.match(/(mouse|activ|clic)[a-z]+/), (function(){tea(offset)}) );
} else {
this.endElementAt(offset);
}
@@ -2328,6 +2326,8 @@
target.tar.style[this.attributeName] = this.to;
}
target.set(this.w, this.h);
+ target.transformable = this.trnasformable;
+ target.paint = this.paint;
this.base = base;
if (this.simpleDuration) {
if (this._end) {