@smarterplan/ngx-smarterplan-core 1.2.38 → 1.2.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/lib/services/matterport.service.mjs +19 -10
- package/fesm2015/smarterplan-ngx-smarterplan-core.mjs +18 -9
- package/fesm2015/smarterplan-ngx-smarterplan-core.mjs.map +1 -1
- package/fesm2020/smarterplan-ngx-smarterplan-core.mjs +18 -9
- package/fesm2020/smarterplan-ngx-smarterplan-core.mjs.map +1 -1
- package/lib/services/matterport.service.d.ts +1 -1
- package/package.json +1 -1
|
@@ -3488,8 +3488,9 @@ class MatterportService {
|
|
|
3488
3488
|
//might break things or fix everything ..?
|
|
3489
3489
|
if (obj.obj3D.uuid != uuid) {
|
|
3490
3490
|
console.log("we have THE problem");
|
|
3491
|
-
obj.obj3D.uuid = uuid;
|
|
3491
|
+
obj.obj3D.uuid = uuid; //not enugh to fix the pb
|
|
3492
3492
|
}
|
|
3493
|
+
return obj;
|
|
3493
3494
|
}
|
|
3494
3495
|
/**
|
|
3495
3496
|
* Creates MattertagData and start repositioning (creates temporary mattertag that follows the cursor)
|
|
@@ -4024,7 +4025,7 @@ class MatterportService {
|
|
|
4024
4025
|
// By defaut, during creation, object has translation gizmo
|
|
4025
4026
|
// => User has to click on lateral panel, and save its position after playing with it!
|
|
4026
4027
|
if (mode && !isNestThermostat) {
|
|
4027
|
-
this.attachGizmoControlTo3DObject(modelNode, sceneObject, mode, true).catch((e) => console.log(e));
|
|
4028
|
+
this.attachGizmoControlTo3DObject(modelNode, sceneObject, mode, true, true).catch((e) => console.log(e));
|
|
4028
4029
|
}
|
|
4029
4030
|
if (this.lastObject3D && typeof this.lastObject3D.id === 'string') {
|
|
4030
4031
|
// prompt ThreeJS UUID to match our last generated object if new (not from Db)
|
|
@@ -4168,7 +4169,7 @@ class MatterportService {
|
|
|
4168
4169
|
}
|
|
4169
4170
|
});
|
|
4170
4171
|
}
|
|
4171
|
-
attachGizmoControlTo3DObject(modelNode, sceneObject, mode, visible) {
|
|
4172
|
+
attachGizmoControlTo3DObject(modelNode, sceneObject, mode, visible, isNewObject) {
|
|
4172
4173
|
return __awaiter(this, void 0, void 0, function* () {
|
|
4173
4174
|
// Create a scene node with a transform control component.
|
|
4174
4175
|
let node = null;
|
|
@@ -4189,13 +4190,21 @@ class MatterportService {
|
|
|
4189
4190
|
// // set 'translate' mode to position the selection.
|
|
4190
4191
|
myControl.inputs.mode = mode;
|
|
4191
4192
|
modelNode.obj3D.controls = myControl; // store gizmoCtrl inside object
|
|
4192
|
-
if (
|
|
4193
|
-
|
|
4194
|
-
|
|
4195
|
-
|
|
4196
|
-
|
|
4197
|
-
|
|
4193
|
+
if (isNewObject) { //i keep the current solution for new objects
|
|
4194
|
+
if (!this.lastObject3D || !this.lastObject3D.controls) {
|
|
4195
|
+
try {
|
|
4196
|
+
modelNode.obj3D.uuid = this.lastObject3D.uuid || this.lastObject3D.id;
|
|
4197
|
+
}
|
|
4198
|
+
catch (e) {
|
|
4199
|
+
console.log(`id obj in Scene was not assigned to id from DB since`);
|
|
4200
|
+
}
|
|
4201
|
+
this.lastObject3D = modelNode.obj3D;
|
|
4198
4202
|
}
|
|
4203
|
+
}
|
|
4204
|
+
else { //objects already in place have to become the "lastObject" (i think?)
|
|
4205
|
+
console.log("in my solution !");
|
|
4206
|
+
console.log(modelNode);
|
|
4207
|
+
console.log(modelNode.obj3D.uuid);
|
|
4199
4208
|
this.lastObject3D = modelNode.obj3D;
|
|
4200
4209
|
}
|
|
4201
4210
|
return modelNode;
|