[Sie-announce] SIEコード [1234]

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2009年 9月 9日 (水) 20:27:12 JST


Revision: 1234
          http://sourceforge.jp/projects/sie/svn/view?view=rev&revision=1234
Author:   dhrname
Date:     2009-09-09 20:27:12 +0900 (Wed, 09 Sep 2009)

Log Message:
-----------


Modified Paths:
--------------
    branches/05x/051/sie.js

Modified: branches/05x/051/sie.js
===================================================================
--- branches/05x/051/sie.js	2009-09-09 10:37:23 UTC (rev 1233)
+++ branches/05x/051/sie.js	2009-09-09 11:27:12 UTC (rev 1234)
@@ -231,7 +231,7 @@
 //chset childNodesで要素を作成していく
 SVGtoVML.prototype.chset = function _s_chset( /*element*/ ele, /*Matrix*/ matrix, /*float*/w, /*float*/h){
   var nods = ele.childNodes, s = null;
-  var name = "group|shape|defs|STOP|fill|stroke|DIV|SPAN|A|image|rect|USE", gname = "DIV|group"; //要素名に合致させる文字列
+  var name = "group|shape|defs|STOP|fill|stroke|DIV|SPAN|A|image|rect|USE|set", gname = "DIV|group"; //要素名に合致させる文字列
   var cmatrix = matrix; //子要素に継がせるCTM
   var te = nods[0];
   if (te !== void 0) {
@@ -277,6 +277,8 @@
           cmatrix = s.transformable;
         } else if (te.nodeName === "image") {
           s = new STImage(te, matrix, w, h);
+        } else if (te.nodeName === "set") {
+          s = new STSetElement(te, matrix);
         }
         if (s) {
           this.children[this.children.length] = s;
@@ -1824,13 +1826,14 @@
 }
 
 //SMIL言語のset要素を参照
-function STSetElement(ele) {
+function STSetElement( /*element*/ ele, /*Matrix*/ matrix) {
   this.tar = ele;
   var begin = new Date(), end = new Date();
   begin.synchParser(ele.getAttribute("begin"));
   end.synchParser(ele.getAttribute("end"));
   begin.indefinite = false;
   end.indefinite = false;
+  this.transformable = matrix;
   this.beginEvent = begin; this.endEvent = end;
   this.currentTime = 0;
   return this;
@@ -1838,20 +1841,24 @@
 //timeLineはアニメーションのタイムラインとして、フレームを再生する際に使用
 NAIBU.timeLine = [];
 STSetElement.prototype.set = function() {
+  try{
   var tb = null;
   if (this.beginEvent.event !== "") {
     tb = this.beginEvent;
+    tb.indefinite = true; //これにより、イベントが起きるまで作動を待たせる
+    this.tar.parentNode.attachEvent(tb.event,(function(){
+      tb.indefinite = false;
+    }));
   }
   if (this.endEvent.event !== "") {
     tb = this.endEvent;
-  }
-  if (!tb) { //イベントが設定されているならば
-    tb.indefinite = true; //これにより、イベントが起きるまで作動を待たせる
+    tb.indefinite = true;
     this.tar.parentNode.attachEvent(tb.event,(function(){
       tb.indefinite = false;
     }));
   }
   NAIBU.timeLine[NAIBU.timeLine.length] = this;
+  } catch (e){stlog.add(e,18590)}
 }
 STSetElement.prototype.frame = function() {
   if (this.beginEvent.isFired(this.currentTime) && !this.endEvent.isFired(this.currentTime)) {
@@ -1948,8 +1955,8 @@
   this.event = midValue || pool;
 }
 var beginEvent = new Date(), endEvent = new Date(), _currentTime = 0;
-beginEvent.synchParser("id.event");
-endEvent.synchParser("00:04");
+beginEvent.synchParser("1s");
+endEvent.synchParser("2s");
 beginEvent.indefinite = false;
 endEvent.indefinite = false;
 function woso(){
@@ -1960,7 +1967,7 @@
 	_currentTime += 100;
 }),41)
 }
-woso();
+
 function utf16( /*string*/ s)  {
   return unescape(s);
 }
@@ -2055,7 +2062,8 @@
     .replace(/<use\s/g, "<use /><v:group ")
     .replace(/\/use>/g, "/v:group>")
     .replace(/<defs(?=\s|>)/g, "<dn:defs")
-    .replace(/\/defs>/g, "/dn:defs>");
+    .replace(/\/defs>/g, "/dn:defs>")
+    .replace(/<set\s/g, "<dn:set ");
   var ob = document.createElement("v:group");
   var obst = ob.style;
   ob.innerHTML = dc;




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