svnno****@sourc*****
svnno****@sourc*****
2009年 12月 13日 (日) 22:03:55 JST
Revision: 1467
http://sourceforge.jp/projects/sie/svn/view?view=rev&revision=1467
Author: dhrname
Date: 2009-12-13 22:03:55 +0900 (Sun, 13 Dec 2009)
Log Message:
-----------
eventSyncメソッドを使って軽量化をした
Modified Paths:
--------------
branches/05x/056/sie.js
Modified: branches/05x/056/sie.js
===================================================================
--- branches/05x/056/sie.js 2009-12-13 11:18:16 UTC (rev 1466)
+++ branches/05x/056/sie.js 2009-12-13 13:03:55 UTC (rev 1467)
@@ -2261,21 +2261,11 @@
this.simpleDuration = this.getOffset(this.dur);
}
if (this.end) {
- offset = this.getOffset(this.end);
- if ( /(mouse|activ|click)/.test(this.end) ) { //イベントがある場合
- var tar;
- if ( /\.\D/.test(this.end) ) {
- tar = this.tar.ownerDocument.getElementById( this.end.substring(0,this.end.indexOf(".")) );
- } else {
- tar = this.target.tar;
- }
+ this.eventSync(this.end,
(function(te, offse, ta) {
ta.attachEvent( "on" + te.end.match(/(mouse|activ|clic)[a-z]+/)[0],
function(){te.endElementAt(offse);}, false );
- })(this, offset, tar);
- } else {
- this.endElementAt(offset);
- }
+ }), "endElementAt");
}
} catch(e) {stlog.add(e, 2239);}
};
@@ -2417,22 +2407,12 @@
this.simpleDuration = this.getOffset(this.dur);
}
if (this.end) {
- offset = this.getOffset(this.end);
- if ( /(mouse|activ|click)/.test(this.end) ) { //イベントがある場合
- var tar;
- if ( /\.\D/.test(this.end) ) {
- tar = this.tar.ownerDocument.getElementById( this.end.substring(0, this.end.indexOf(".")) );
- } else {
- tar = this.target.tar;
- }
+ this.eventSync(this.end,
//クロージャを参照
(function(te, offse, ta) {
ta.addEventListener( te.end.match(/(mouse|activ|clic)[a-z]+/)[0],
function(){te.endElementAt(offse);}, false );
- })(this, offset, tar);
- } else {
- this.endElementAt(offset);
- }
+ }), "endElementAt");
}
} catch(e) {stlog.add(e, 2239);}
};