Skip to content

Commit 86ac91d

Browse files
author
Léna Voinchet
committed
Change default height for Add node button
1 parent 2228935 commit 86ac91d

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

js/UI/Popup.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ class Popup{
417417
document.getElementById('dimensions-width-input').value = Math.floor(sceneSize[0] * sceneManager.currentUnit.value * 100) / 100;
418418
document.getElementById('dimensions-length-input').value = Math.floor(sceneSize[1] * sceneManager.currentUnit.value * 100) / 100;
419419
const nodes = JSON.parse(sceneInfos).objects.nodes;
420-
if(nodes.length > 0) document.getElementById('dimensions-distance-input').value = Math.floor((nodes[0].p_z) * sceneManager.currentUnit.value * 100) / 100;
420+
if(nodes.length > 0) document.getElementById('dimensions-distance-input').value = Math.floor((nodes[0].zPos) * sceneManager.currentUnit.value * 100) / 100;
421421
else document.getElementById('dimensions-distance-input').value = '';
422422
break;
423423
default:

js/UI/UIManager.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class UIManager{
2727
if(lidarRaysButton) lidarRaysButton.addEventListener('click', () => viewportManager.sceneManager.objects.displayRays());
2828

2929
const addNodeButton = document.getElementById('add-node-button');
30-
if(addNodeButton) addNodeButton.addEventListener('click', () => viewportManager.sceneManager.objects.addNode());
30+
if(addNodeButton) addNodeButton.addEventListener('click', () => viewportManager.sceneManager.objects.addNode(false, viewportManager.sceneManager.trackingMode, Node.DEFAULT_CAMERA_TYPE_ID, 0, 0, viewportManager.sceneManager.sceneSensorHeight, 0, 0, 0));
3131
const deleteAllNodesButton = document.getElementById('delete-all-nodes-button');
3232
if(deleteAllNodesButton) deleteAllNodesButton.addEventListener('click', () => viewportManager.sceneManager.objects.removeNodes());
3333

js/scene/objects/SceneObjects.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ class SceneObjects{
247247
if (selectElement) {
248248
selectElement.value = newCamera.cameraType.name;
249249

250-
// Here we send a fake "change" message on the selectElement to activate chageCameraType function in nodeUI.js
250+
// Here we send a fake "change" message on the selectElement to activate changeCameraType function in nodeUI.js
251251
const changeEvent = new Event('change', {
252252
bubbles: true,
253253
cancelable: true
@@ -264,7 +264,7 @@ class SceneObjects{
264264
this.populateStorage();
265265
}
266266

267-
this.addLidar = function(autoConstruct = false, typeID = Lidar.DEFAULT_LIDAR_TYPE_ID, x = 0, z = Lidar.DEFAULT_LIDAR_HEIGHT, r = 0)
267+
this.addLidar = function(autoConstruct = false, typeID = Lidar.DEFAULT_LIDAR_TYPE_ID, x = 0, z = Lidar.DEFAULT_LIDAR_HOOK_HEIGHT, r = 0)
268268
{
269269
if(!SceneObjects.font)
270270
{

0 commit comments

Comments
 (0)