Commit 9bb0158c authored by techird's avatar techird

option

parent f3cc4c73
......@@ -13,13 +13,13 @@ var MinderDefaultOptions = {};
var Minder = KityMinder.Minder = kity.createClass( "KityMinder", {
constructor: function ( options ) {
options = Utils.extend( window.KITYMINDER_CONFIG || {}, MinderDefaultOptions, options || {} );
this._options = Utils.extend( window.KITYMINDER_CONFIG || {}, MinderDefaultOptions, options || {} );
this._initEvents();
this._initMinder( options );
this._initModules( options );
this._initMinder();
this._initModules();
},
_initMinder: function ( option ) {
_initMinder: function () {
this._rc = new kity.Group();
this._paper = new kity.Paper();
......@@ -28,8 +28,8 @@ var Minder = KityMinder.Minder = kity.createClass( "KityMinder", {
this._root = new MinderNode( this );
this._rc.addShape( this._root.getRenderContainer() );
if ( option.renderTo ) {
this.renderTo( option.renderTo );
if ( this._options.renderTo ) {
this.renderTo( this._options.renderTo );
}
},
......
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