mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 04:18:12 +02:00
strokes are now parented to whiteboard surface
This commit is contained in:
parent
d0752143dc
commit
5762c33cfe
1 changed files with 11 additions and 3 deletions
|
@ -107,7 +107,9 @@
|
||||||
_this.resetStroke();
|
_this.resetStroke();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
_this.resetStroke();
|
if (_this.currentStroke) {
|
||||||
|
_this.resetStroke();
|
||||||
|
}
|
||||||
|
|
||||||
Overlays.editOverlay(_this.laserPointer, {
|
Overlays.editOverlay(_this.laserPointer, {
|
||||||
visible: false
|
visible: false
|
||||||
|
@ -130,7 +132,6 @@
|
||||||
textures: _this.MARKER_TEXTURE_URL,
|
textures: _this.MARKER_TEXTURE_URL,
|
||||||
color: _this.markerColor,
|
color: _this.markerColor,
|
||||||
lifetime: 500,
|
lifetime: 500,
|
||||||
// parentID: _this.currentWhiteboard
|
|
||||||
});
|
});
|
||||||
|
|
||||||
_this.linePoints = [];
|
_this.linePoints = [];
|
||||||
|
@ -174,13 +175,20 @@
|
||||||
});
|
});
|
||||||
|
|
||||||
if (_this.linePoints.length > MAX_POINTS_PER_STROKE) {
|
if (_this.linePoints.length > MAX_POINTS_PER_STROKE) {
|
||||||
|
Entities.editEntity(_this.currentStroke, {
|
||||||
|
parentID: _this.currentWhiteboard
|
||||||
|
});
|
||||||
_this.currentStroke = null;
|
_this.currentStroke = null;
|
||||||
_this.oldPosition = position;
|
_this.oldPosition = position;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
resetStroke: function() {
|
resetStroke: function() {
|
||||||
|
|
||||||
|
Entities.editEntity(_this.currentStroke, {
|
||||||
|
parentID: _this.currentWhiteboard
|
||||||
|
});
|
||||||
_this.currentStroke = null;
|
_this.currentStroke = null;
|
||||||
|
|
||||||
_this.oldPosition = null;
|
_this.oldPosition = null;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue