Royi Bernthal 7 년 전
부모
커밋
4f2c9bb6e4
2개의 변경된 파일19개의 추가작업 그리고 17개의 파일을 삭제
  1. 8 6
      gui/src/controls/multiLine.ts
  2. 11 11
      gui/src/multiLinePoint.ts

+ 8 - 6
gui/src/controls/multiLine.ts

@@ -37,7 +37,7 @@ module BABYLON.GUI {
             this._markAsDirty();
         }
 
-        getAt(index: number): MultiLinePoint {
+        public getAt(index: number): MultiLinePoint {
             if (!this._points[index]) {
                 this._points[index] = new MultiLinePoint(this);
             }
@@ -45,11 +45,11 @@ module BABYLON.GUI {
             return this._points[index] as MultiLinePoint;
         }
 
-        onPointUpdate = (): void => {
+        public onPointUpdate = (): void => {
             this._markAsDirty();
         }
 
-        add(...items: (AbstractMesh | Control | { x: string | number, y: string | number })[]): void {
+        public add(...items: (AbstractMesh | Control | { x: string | number, y: string | number })[]): void {
             items.forEach(item => {
                 var point: MultiLinePoint = this.push();
 
@@ -66,11 +66,11 @@ module BABYLON.GUI {
             });
         }
 
-        push(): MultiLinePoint {
+        public push(): MultiLinePoint {
             return this.getAt(this._points.length);
         }
 
-        remove(value: number | MultiLinePoint): void {
+        public remove(value: number | MultiLinePoint): void {
             var index: number;
             
             if (value instanceof MultiLinePoint) {
@@ -205,10 +205,12 @@ module BABYLON.GUI {
             this._currentMeasure.top = this._minY - this._lineWidth / 2;  
         }
 
-        dispose(): void {
+        public dispose(): void {
             while (this._points.length > 0) {
                 this.remove(this._points.length - 1);
             }
+
+            super.dispose();
         }
 
     }    

+ 11 - 11
gui/src/multiLinePoint.ts

@@ -14,7 +14,7 @@ module BABYLON.GUI {
         private _controlObserver: Nullable< Observer<Control> >;
         private _meshObserver: Nullable< Observer<Camera> >;
 
-        _point: Vector2;
+        public _point: Vector2;
 
         constructor(multiLine: MultiLine) {
             this._multiLine = multiLine;
@@ -25,11 +25,11 @@ module BABYLON.GUI {
             this._point = new Vector2(0, 0);
         }
 
-        get x(): string | number {
+        public get x(): string | number {
             return this._x.toString(this._multiLine._host);
         }
 
-        set x(value: string | number) {
+        public set x(value: string | number) {
             if (this._x.toString(this._multiLine._host) === value) {
                 return;
             }
@@ -39,11 +39,11 @@ module BABYLON.GUI {
             }
         }
 
-        get y(): string | number {
+        public get y(): string | number {
             return this._y.toString(this._multiLine._host);
         }
 
-        set y(value: string | number) {
+        public set y(value: string | number) {
             if (this._y.toString(this._multiLine._host) === value) {
                 return;
             }
@@ -53,11 +53,11 @@ module BABYLON.GUI {
             }
         }
 
-        get control(): Nullable<Control> {
+        public get control(): Nullable<Control> {
             return this._control;
         }
 
-        set control(value: Nullable<Control>) {
+        public set control(value: Nullable<Control>) {
             if (this._control === value) {
                 return;
             }
@@ -77,11 +77,11 @@ module BABYLON.GUI {
             this._multiLine._markAsDirty();
         }
 
-        get mesh(): Nullable<AbstractMesh> {
+        public get mesh(): Nullable<AbstractMesh> {
             return this._mesh;
         }
 
-        set mesh(value: Nullable<AbstractMesh>) {
+        public set mesh(value: Nullable<AbstractMesh>) {
             if (this._mesh === value) {
                 return;
             }
@@ -99,7 +99,7 @@ module BABYLON.GUI {
             this._multiLine._markAsDirty();
         }
 
-        translate(): Vector2 {
+        public translate(): Vector2 {
             this._point = this._translatePoint();
 
             return this._point;
@@ -122,7 +122,7 @@ module BABYLON.GUI {
             }
         }
 
-        dispose(): void {
+        public dispose(): void {
             this.control = null;
             this.mesh = null;
         }