From b2665fddf15e5dad9f5b284e8563a6ff9bcdcd6b Mon Sep 17 00:00:00 2001 From: Ruben van de Ven Date: Sun, 25 Oct 2020 13:01:15 +0100 Subject: [PATCH] Change default files to reflect box removal and change canvas sizing --- client/modules/IDE/reducers/files.js | 4 +++- server/domain-objects/createDefaultFiles.js | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/client/modules/IDE/reducers/files.js b/client/modules/IDE/reducers/files.js index b004caca..06d6d382 100644 --- a/client/modules/IDE/reducers/files.js +++ b/client/modules/IDE/reducers/files.js @@ -6,7 +6,7 @@ const defaultSketch = `// liveUpdate function drawMask(detection) { stroke('red'); strokeWeight(2); - rect(detection.box.x, detection.box.y, detection.box.width, detection.box.height) + rect(detection.x, detection.y, detection.width, detection.height) }`; const defaultHTML = @@ -34,6 +34,8 @@ const defaultCSS = } canvas { display: block; + width: 100% !important; + height: auto !important; } `; diff --git a/server/domain-objects/createDefaultFiles.js b/server/domain-objects/createDefaultFiles.js index 9f2fb78e..8ae58128 100644 --- a/server/domain-objects/createDefaultFiles.js +++ b/server/domain-objects/createDefaultFiles.js @@ -3,7 +3,7 @@ const defaultSketch = `// liveUpdate function drawMask(detection) { stroke('red'); strokeWeight(2); - rect(detection.box.x, detection.box.y, detection.box.width, detection.box.height) + rect(detection.x, detection.y, detection.width, detection.height) } `; @@ -31,6 +31,8 @@ const defaultCSS = } canvas { display: block; + width: 100% !important; + height: auto !important; } `;