|
@@ -15,7 +15,19 @@ import { SGraphyScene } from "./SGraphyScene";
|
|
|
*/
|
|
|
export class SGraphyView extends SCanvasView {
|
|
|
/** 场景对象 */
|
|
|
- scene: SGraphyScene | null = new SGraphyScene();
|
|
|
+ private _scene : SGraphyScene | null = null;
|
|
|
+ get scene(): SGraphyScene | null {
|
|
|
+ return this._scene;
|
|
|
+ } // Get scene
|
|
|
+ set scene(v: SGraphyScene | null) {
|
|
|
+ if (this._scene != null) {
|
|
|
+ this._scene.view = null;
|
|
|
+ }
|
|
|
+ this._scene = v;
|
|
|
+ if (this._scene != null) {
|
|
|
+ this._scene.view = this;
|
|
|
+ }
|
|
|
+ } // Set scene
|
|
|
|
|
|
/**
|
|
|
* 构造函数
|