Commit 0dc2d12a authored by campaign's avatar campaign

添加beforeexport事件

parent df37aa2a
...@@ -53,6 +53,7 @@ function importNode( node, json, km ) { ...@@ -53,6 +53,7 @@ function importNode( node, json, km ) {
return node; return node;
} }
// 导入导出 // 导入导出
kity.extendClass( Minder, { kity.extendClass( Minder, {
exportData: function ( protocalName ) { exportData: function ( protocalName ) {
...@@ -60,6 +61,13 @@ kity.extendClass( Minder, { ...@@ -60,6 +61,13 @@ kity.extendClass( Minder, {
json = exportNode( this.getRoot() ); json = exportNode( this.getRoot() );
protocal = KityMinder.findProtocal( protocalName ); protocal = KityMinder.findProtocal( protocalName );
if(this._fire( new MinderEvent( 'beforeexport', {
json:json,
protocalName: protocalName,
protocal: protocal
},true ) ) === true) return;
if ( protocal ) { if ( protocal ) {
return protocal.encode( json, this ); return protocal.encode( json, this );
} else { } else {
......
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