前のバージョンとAPIの互換性を維持するように

git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@5691 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
piro 2010-01-04 04:03:07 +00:00
parent c8c2e0bbbf
commit 5999ccf731

View File

@ -101,8 +101,9 @@
this._doingUndo = true;
var data = history.entries[history.index--];
var f = this._getAvailableFunction(data.onUndo, data.onundo, data.undo);
try {
(data.onUndo || data.onundo)();
if (f) f.call(data);
}
catch(e) {
error = e;
@ -124,9 +125,9 @@
var error;
this._doingUndo = true;
var data = history.entries[history.index++];
var f = this._getAvailableFunction(data.onRedo, data.onredo, data.redo);
try {
(data.onRedo || data.onredo)(this);
if (f) f.call(data);
}
catch(e) {
error = e;
@ -251,6 +252,18 @@
};
},
_getAvailableFunction : function()
{
var functions = Array.slice(arguments);
for (var i in functions)
{
let f = functions[i];
if (f && typeof f == 'function')
return f;
}
return null;
},
_deleteWindowTables : function()
{
var id = this.getWindowId(window);