From 5762c33cfebb87b56bcacd172cc572759b995115 Mon Sep 17 00:00:00 2001 From: ericrius1 Date: Fri, 26 Feb 2016 15:07:22 -0800 Subject: [PATCH] strokes are now parented to whiteboard surface --- .../homeContent/whiteboardV2/markerEntityScript.js | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/examples/homeContent/whiteboardV2/markerEntityScript.js b/examples/homeContent/whiteboardV2/markerEntityScript.js index 64b906dda1..d06d5cf8e9 100644 --- a/examples/homeContent/whiteboardV2/markerEntityScript.js +++ b/examples/homeContent/whiteboardV2/markerEntityScript.js @@ -107,7 +107,9 @@ _this.resetStroke(); } } else { - _this.resetStroke(); + if (_this.currentStroke) { + _this.resetStroke(); + } Overlays.editOverlay(_this.laserPointer, { visible: false @@ -130,7 +132,6 @@ textures: _this.MARKER_TEXTURE_URL, color: _this.markerColor, lifetime: 500, - // parentID: _this.currentWhiteboard }); _this.linePoints = []; @@ -174,13 +175,20 @@ }); if (_this.linePoints.length > MAX_POINTS_PER_STROKE) { + Entities.editEntity(_this.currentStroke, { + parentID: _this.currentWhiteboard + }); _this.currentStroke = null; _this.oldPosition = position; } }, - resetStroke: function() { + + Entities.editEntity(_this.currentStroke, { + parentID: _this.currentWhiteboard + }); _this.currentStroke = null; + _this.oldPosition = null; },