diff --git a/.vscode/settings.json b/.vscode/settings.json index 79394c28..a740241d 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -5,7 +5,7 @@ "*.fs": "cpp" }, "files.trimTrailingWhitespace": false, - "editor.fontSize": 18, + "editor.fontSize": 16, "editor.autoIndent": false, "editor.detectIndentation": false, "editor.renderWhitespace": "all", diff --git a/src/Annotation.js b/src/Annotation.js index 1adda32a..757eedbe 100644 --- a/src/Annotation.js +++ b/src/Annotation.js @@ -13,6 +13,7 @@ Potree.Annotation = class extends THREE.EventDispatcher { this.scene = null; this._title = args.title || 'No Title'; this._description = args.description || ''; + this.offset = new THREE.Vector3(); if (!args.position) { this.position = null; diff --git a/src/viewer/potree.css b/src/viewer/potree.css index ac41ab95..55b4945f 100644 --- a/src/viewer/potree.css +++ b/src/viewer/potree.css @@ -201,7 +201,7 @@ a:hover, a:visited, a:link, a:active{ margin: auto; display: table; padding: 1px 8px; - cursor: pointer; + cursor: pointer; } .annotation-expand{ diff --git a/src/viewer/viewer.js b/src/viewer/viewer.js index 8150e21b..bbf7d97a 100644 --- a/src/viewer/viewer.js +++ b/src/viewer/viewer.js @@ -1013,7 +1013,8 @@ Potree.Viewer = class PotreeViewer extends THREE.EventDispatcher{ let element = annotation.domElement; - let position = annotation.position; + let position = annotation.position.clone(); + position.add(annotation.offset); if (!position) { position = annotation.boundingBox.getCenter(); }