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):
|
||||
{ transformNode: TransformNode, newMesh: AbstractMesh } {
|
||||
const scene = DefaultScene.Scene;
|
||||
const newMesh = diagramManager.createCopy(mesh);
|
||||
const newMesh = diagramManager.createCopy(mesh, true);
|
||||
const transformNode = new TransformNode("grabAnchor", scene);
|
||||
transformNode.id = "grabAnchor";
|
||||
transformNode.position = newMesh.position.clone();
|
||||
|
||||
@ -128,7 +128,7 @@ export class DiagramConnection {
|
||||
|
||||
private buildConnection() {
|
||||
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.metadata = {exportable: true};
|
||||
|
||||
@ -24,7 +24,6 @@ export class ScaleMenu {
|
||||
public show(mesh: AbstractMesh) {
|
||||
this.transform.position = mesh.absolutePosition.clone();
|
||||
this.transform.position.y = mesh.getBoundingInfo().boundingBox.maximumWorld.y + .1;
|
||||
//this.transform.billboardMode = TransformNode.BILLBOARDMODE_Y;
|
||||
this.transform.setEnabled(true);
|
||||
this._mesh = mesh;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user