ライブラリ更新
git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@5714 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
parent
dcc364a4f1
commit
e8ad4cb544
@ -155,10 +155,11 @@
|
|||||||
|
|
||||||
this._doingUndo = true;
|
this._doingUndo = true;
|
||||||
var processed = false;
|
var processed = false;
|
||||||
while (processed === false)
|
var error;
|
||||||
{
|
do {
|
||||||
let error;
|
let data = history.entries[history.index];
|
||||||
let data = history.entries[history.index--];
|
history.index = Math.max(0, history.index-1);
|
||||||
|
if (!data) continue;
|
||||||
let f = this._getAvailableFunction(data.onUndo, data.onundo, data.undo);
|
let f = this._getAvailableFunction(data.onUndo, data.onundo, data.undo);
|
||||||
let done = false;
|
let done = false;
|
||||||
try {
|
try {
|
||||||
@ -175,9 +176,12 @@
|
|||||||
}
|
}
|
||||||
this._dispatchEvent('UIOperationGlobalHistoryUndo', options, data, done);
|
this._dispatchEvent('UIOperationGlobalHistoryUndo', options, data, done);
|
||||||
}
|
}
|
||||||
|
while (processed === false && history.index > 0)
|
||||||
this._doingUndo = false;
|
this._doingUndo = false;
|
||||||
|
|
||||||
if (error) throw error;
|
if (error)
|
||||||
|
throw error;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -185,14 +189,17 @@
|
|||||||
{
|
{
|
||||||
var options = this._getOptionsFromArguments(arguments);
|
var options = this._getOptionsFromArguments(arguments);
|
||||||
var history = options.history;
|
var history = options.history;
|
||||||
if (history.index > history.entries.length-1)
|
var max = history.entries.length;
|
||||||
|
if (history.index > max-1)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
this._doingUndo = true;
|
this._doingUndo = true;
|
||||||
var processed = false;
|
var processed = false;
|
||||||
while (processed === false)
|
var error;
|
||||||
{
|
do {
|
||||||
let error;
|
let data = history.entries[history.index];
|
||||||
|
history.index = Math.min(max-1, history.index+1);
|
||||||
|
if (!data) continue;
|
||||||
let f = this._getAvailableFunction(data.onRedo, data.onredo, data.redo);
|
let f = this._getAvailableFunction(data.onRedo, data.onredo, data.redo);
|
||||||
let done = false;
|
let done = false;
|
||||||
try {
|
try {
|
||||||
@ -209,9 +216,12 @@
|
|||||||
}
|
}
|
||||||
this._dispatchEvent('UIOperationGlobalHistoryRedo', options, data, done);
|
this._dispatchEvent('UIOperationGlobalHistoryRedo', options, data, done);
|
||||||
}
|
}
|
||||||
|
while (processed === false && history.index < max-1)
|
||||||
this._doingUndo = false;
|
this._doingUndo = false;
|
||||||
|
|
||||||
if (error) throw error;
|
if (error)
|
||||||
|
throw error;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user