Browse Source

Comments.

Taton Sven 7 years ago
parent
commit
2fdcda2df3
1 changed files with 10 additions and 1 deletions
  1. 10 1
      gui/src/controls/line.ts

+ 10 - 1
gui/src/controls/line.ts

@@ -181,6 +181,12 @@ module BABYLON.GUI {
             this._currentMeasure.top = Math.min(this._y1.getValue(this._host), this._effectiveY2) - this._lineWidth / 2;            
         }
 
+        /**
+         * Move one end of the line given 3D cartesian coordinates.
+         * @param position Targeted world position
+         * @param scene Scene
+         * @param end (opt) Set to true to assign x2 and y2 coordinates of the line. Default assign to x1 and y1.
+         */
         public moveToVector3(position: Vector3, scene: Scene, end: boolean = false): void {
             if (!this._host || this._root !== this._host._rootContainer) {
                 Tools.Error("Cannot move a control to a vector3 if the control is not at root level");
@@ -199,8 +205,11 @@ module BABYLON.GUI {
             this.notRenderable = false;
         }
 
+        /**
+         * @param projectedPosition 
+         * @param end (opt) Set to true to assign x2 and y2 coordinates of the line. Default assign to x1 and y1.
+         */
         public _moveToProjectedPosition(projectedPosition: Vector3, end: boolean = false): void {
-            
             let x: string = (projectedPosition.x + this._linkOffsetX.getValue(this._host)) + "px";
             let y: string = (projectedPosition.y + this._linkOffsetY.getValue(this._host)) + "px";