Fixed grab and clone to replicate properly. Changed connection size to match size menu control.
This commit is contained in:
parent
b2c5c85d7e
commit
4b06cb2679
@ -5,7 +5,7 @@ import {DefaultScene} from "../../defaultScene";
|
|||||||
export function grabAndClone(diagramManager: DiagramManager, mesh: AbstractMesh, parent: AbstractMesh):
|
export function grabAndClone(diagramManager: DiagramManager, mesh: AbstractMesh, parent: AbstractMesh):
|
||||||
{ transformNode: TransformNode, newMesh: AbstractMesh } {
|
{ transformNode: TransformNode, newMesh: AbstractMesh } {
|
||||||
const scene = DefaultScene.Scene;
|
const scene = DefaultScene.Scene;
|
||||||
const newMesh = diagramManager.createCopy(mesh);
|
const newMesh = diagramManager.createCopy(mesh, true);
|
||||||
const transformNode = new TransformNode("grabAnchor", scene);
|
const transformNode = new TransformNode("grabAnchor", scene);
|
||||||
transformNode.id = "grabAnchor";
|
transformNode.id = "grabAnchor";
|
||||||
transformNode.position = newMesh.position.clone();
|
transformNode.position = newMesh.position.clone();
|
||||||
|
|||||||
@ -128,7 +128,7 @@ export class DiagramConnection {
|
|||||||
|
|
||||||
private buildConnection() {
|
private buildConnection() {
|
||||||
this.logger.debug(`buildConnection from ${this._from} to ${this._to}`);
|
this.logger.debug(`buildConnection from ${this._from} to ${this._to}`);
|
||||||
this._mesh = MeshBuilder.CreateCylinder(this.id + "_connection", {diameter: .02, height: 1}, this.scene);
|
this._mesh = MeshBuilder.CreateCylinder(this.id + "_connection", {diameter: .025, height: 1}, this.scene);
|
||||||
|
|
||||||
this.transformNode = new TransformNode(this.id + "_transform", this.scene);
|
this.transformNode = new TransformNode(this.id + "_transform", this.scene);
|
||||||
this.transformNode.metadata = {exportable: true};
|
this.transformNode.metadata = {exportable: true};
|
||||||
|
|||||||
@ -24,7 +24,6 @@ export class ScaleMenu {
|
|||||||
public show(mesh: AbstractMesh) {
|
public show(mesh: AbstractMesh) {
|
||||||
this.transform.position = mesh.absolutePosition.clone();
|
this.transform.position = mesh.absolutePosition.clone();
|
||||||
this.transform.position.y = mesh.getBoundingInfo().boundingBox.maximumWorld.y + .1;
|
this.transform.position.y = mesh.getBoundingInfo().boundingBox.maximumWorld.y + .1;
|
||||||
//this.transform.billboardMode = TransformNode.BILLBOARDMODE_Y;
|
|
||||||
this.transform.setEnabled(true);
|
this.transform.setEnabled(true);
|
||||||
this._mesh = mesh;
|
this._mesh = mesh;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user