Ensure that monitors will be visible when imported

This commit is contained in:
Thomas Weber committed 2021-04-09 15:39:58 -05:00
1 parent 2b81e53317
commit 9efafa34b1
1 file changed
+2
+2
View File
@@ -1093,6 +1093,8 @@ const deserializeMonitor = function (monitorData, runtime, targets, extensions)
const yOffset = (runtime.stageHeight - 360) / 2;
monitorData.x += xOffset;
monitorData.y += yOffset;
monitorData.x = MathUtil.clamp(monitorData.x, 0, runtime.stageWidth);
monitorData.y = MathUtil.clamp(monitorData.y, 0, runtime.stageHeight);
// If the serialized monitor has spriteName defined, look up the sprite
// by name in the given list of targets and update the monitor's targetId