Commit 1b82f700 authored by Akikonata's avatar Akikonata

Merge branch 'dev' of https://github.com/kitygraph/kityminder into dev

parents cddde595 866f4d76
KityMinder.registerModule( "HistoryModule", function () { KityMinder.registerModule( "HistoryModule", function () {
var Scene = kity.createClass('Scene',{ var Scene = kity.createClass('Scene',{
constructor:function(root){ constructor:function(root){
this.data = root.clone(); this.data = root.clone();
...@@ -17,7 +15,7 @@ KityMinder.registerModule( "HistoryModule", function () { ...@@ -17,7 +15,7 @@ KityMinder.registerModule( "HistoryModule", function () {
return this.getData().equals(scene.getData()) return this.getData().equals(scene.getData())
} }
}); });
var HistoryManager = kity.createClass('UndoManager',{ var HistoryManager = kity.createClass('HistoryManager',{
constructor : function(km){ constructor : function(km){
this.list = []; this.list = [];
this.index = 0; this.index = 0;
...@@ -87,7 +85,7 @@ KityMinder.registerModule( "HistoryModule", function () { ...@@ -87,7 +85,7 @@ KityMinder.registerModule( "HistoryModule", function () {
this.hasRedo = false; this.hasRedo = false;
} }
}); });
//为km实例添加history管理
this.historyManager = new HistoryManager(this); this.historyManager = new HistoryManager(this);
return { return {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment