|
@@ -88,5 +88,86 @@ export class SGraphSelectContainer extends SObject {
|
|
|
*
|
|
|
* @param type 对齐方式
|
|
|
* */
|
|
|
- layout(type: SGraphLayoutType): void {} // Function clear()
|
|
|
+ layout(type: SGraphLayoutType): void {
|
|
|
+ if (this.itemList.length < 2) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ switch (type) {
|
|
|
+ case SGraphLayoutType.Left:
|
|
|
+ this.alignLeft();
|
|
|
+ break;
|
|
|
+ case SGraphLayoutType.Bottom:
|
|
|
+ this.alignBottom();
|
|
|
+ break;
|
|
|
+ case SGraphLayoutType.center:
|
|
|
+ this.alignCenter();
|
|
|
+ break;
|
|
|
+ case SGraphLayoutType.Horizontal:
|
|
|
+ this.alignHorizontal();
|
|
|
+ break;
|
|
|
+ case SGraphLayoutType.middle:
|
|
|
+ this.alignMiddle();
|
|
|
+ break;
|
|
|
+ case SGraphLayoutType.Right:
|
|
|
+ this.alignRight();
|
|
|
+ break;
|
|
|
+ case SGraphLayoutType.Top:
|
|
|
+ this.alignTop();
|
|
|
+ break;
|
|
|
+ case SGraphLayoutType.Vertical:
|
|
|
+ this.alignVertical();
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ console.log("对齐类型不存在");
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ } // Function layout()
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 左对齐
|
|
|
+ *
|
|
|
+ * */
|
|
|
+ private alignLeft(): void {} // Function alignLeft()
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 顶对齐
|
|
|
+ *
|
|
|
+ * */
|
|
|
+ private alignTop(): void {} // Function alignTop()
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 右对齐
|
|
|
+ *
|
|
|
+ * */
|
|
|
+ private alignRight(): void {} // Function alignRight()
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 底对齐
|
|
|
+ *
|
|
|
+ * */
|
|
|
+ private alignBottom(): void {} // Function alignBottom()
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 水平居中对齐
|
|
|
+ *
|
|
|
+ * */
|
|
|
+ private alignCenter(): void {} // Function alignCenter()
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 垂直居中对齐
|
|
|
+ *
|
|
|
+ * */
|
|
|
+ private alignMiddle(): void {} // Function alignMiddle()
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 水平分散
|
|
|
+ *
|
|
|
+ * */
|
|
|
+ private alignVertical(): void {} // Function alignVertical()
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 垂直分散
|
|
|
+ *
|
|
|
+ * */
|
|
|
+ private alignHorizontal(): void {} // Function alignHorizontal()
|
|
|
} // Class SGraphSelectContainer
|