SmokeComponent

This commit is contained in:
liteng 2019-01-22 20:12:37 +08:00
parent 4ed15f2736
commit 2b09ef0345
3 changed files with 8 additions and 6 deletions

View File

@ -183,3 +183,4 @@ L_CAMERA_TOP = '相机上';
L_CAMERA_BOTTOM = '相机下';
L_CAMERA_NEAR = '相机近';
L_CAMERA_FAR = '相机远';
L_SMOKE_COMPONENT = '烟组件';

View File

@ -33,7 +33,7 @@ SmokeComponent.prototype.render = function () {
color: '#555',
fontWeight: 'bold'
},
text: '烟组件'
text: L_SMOKE_COMPONENT
}, {
xtype: 'row',
children: [{
@ -42,7 +42,7 @@ SmokeComponent.prototype.render = function () {
xtype: 'button',
id: 'btnPreview',
scope: this.id,
text: '预览',
text: L_PREVIEW,
onClick: this.onPreview.bind(this)
}]
}]
@ -78,9 +78,9 @@ SmokeComponent.prototype.updateUI = function () {
var btnPreview = UI.get('btnPreview', this.id);
if (this.isPlaying) {
btnPreview.setText('取消');
btnPreview.setText(L_CANCEL);
} else {
btnPreview.setText('预览');
btnPreview.setText(L_PREVIEW);
}
};
@ -96,7 +96,7 @@ SmokeComponent.prototype.startPreview = function () {
var btnPreview = UI.get('btnPreview', this.id);
this.isPlaying = true;
btnPreview.setText('取消');
btnPreview.setText(L_CANCEL);
this.app.on(`animate.${this.id}`, this.onAnimate.bind(this));
};
@ -105,7 +105,7 @@ SmokeComponent.prototype.stopPreview = function () {
var btnPreview = UI.get('btnPreview', this.id);
this.isPlaying = false;
btnPreview.setText('预览');
btnPreview.setText(L_PREVIEW);
this.app.on(`animate.${this.id}`, null);
};

View File

@ -183,4 +183,5 @@ Object.assign(window, {
L_CAMERA_BOTTOM: 'CameraBottom',
L_CAMERA_NEAR: 'CameraNear',
L_CAMERA_FAR: 'CameraFar',
L_SMOKE_COMPONENT: 'SmokeComponent',
});