修复bug。

This commit is contained in:
liteng 2019-01-07 20:44:17 +08:00
parent 8b83fead40
commit 653e35f3e9
2 changed files with 4 additions and 2 deletions

View File

@ -53,7 +53,6 @@ StatusBar.prototype.render = function () {
}, {
xtype: 'checkbox',
id: 'cbThrowBall',
scope: this.id,
onChange: this.onEnableThrowBall.bind(this)
}]
}]
@ -111,7 +110,7 @@ StatusBar.prototype.onUpdateInfo = function () {
};
StatusBar.prototype.onEnableThrowBall = function () {
var enabled = UI.get('cbThrowBall', this.id);
var enabled = UI.get('cbThrowBall');
this.app.call('enableThrowBall', this, enabled.getValue());
};

View File

@ -22,6 +22,9 @@ ThrowBallEvent.prototype.create = function (scene, camera, renderer) {
this.scene = scene;
this.camera = camera;
this.renderer = renderer;
this.enabled = UI.get('cbThrowBall').getValue();
this.app.on(`click.${this.id}`, this.throwBall.bind(this));
this.app.on(`enableThrowBall.${this.id}`, this.onEnableThrowBall.bind(this));
};