improve annotations

This commit is contained in:
m-schuetz 2018-03-19 17:52:47 +01:00
parent d8725bf815
commit 4fe8451677
4 changed files with 5 additions and 3 deletions

View File

@ -5,7 +5,7 @@
"*.fs": "cpp"
},
"files.trimTrailingWhitespace": false,
"editor.fontSize": 18,
"editor.fontSize": 16,
"editor.autoIndent": false,
"editor.detectIndentation": false,
"editor.renderWhitespace": "all",

View File

@ -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;

View File

@ -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{

View File

@ -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();
}