mirror of https://gitee.com/antv-l7/antv-l7
fix: detroy method
This commit is contained in:
parent
e95b5941fe
commit
661ff69fb1
|
@ -28,7 +28,7 @@ import { ISceneService } from './ISceneService';
|
|||
*/
|
||||
@injectable()
|
||||
export default class Scene extends EventEmitter implements ISceneService {
|
||||
public destroyed: true;
|
||||
public destroyed: boolean = false;
|
||||
|
||||
@inject(TYPES.SceneID)
|
||||
private readonly id: string;
|
||||
|
@ -205,7 +205,7 @@ export default class Scene extends EventEmitter implements ISceneService {
|
|||
}
|
||||
|
||||
public async render() {
|
||||
if (this.rendering && !this.destroyed) {
|
||||
if (this.rendering && this.destroyed) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -214,7 +214,7 @@ export default class Scene extends EventEmitter implements ISceneService {
|
|||
if (!this.inited) {
|
||||
// 还未初始化完成需要等待
|
||||
await this.initPromise;
|
||||
if (this.destroy) {
|
||||
if (this.destroyed) {
|
||||
this.destroy();
|
||||
}
|
||||
|
||||
|
|
|
@ -22,7 +22,6 @@ export default class Column extends React.Component {
|
|||
rotation: 134.9507,
|
||||
}),
|
||||
});
|
||||
scene.destroy();
|
||||
this.scene = scene;
|
||||
fetch(
|
||||
'https://gw.alipayobjects.com/os/basement_prod/893d1d5f-11d9-45f3-8322-ee9140d288ae.json',
|
||||
|
|
Loading…
Reference in New Issue