diff --git a/public/draw.js b/public/draw.js index cfbff0e..4527b1f 100644 --- a/public/draw.js +++ b/public/draw.js @@ -11,6 +11,7 @@ var strPath; var buffer = []; // Contains the last positions of the mouse cursor const startDrawing = (e) => { + e.preventDefault(); bufferSize = 8; path = document.createElementNS("http://www.w3.org/2000/svg", "path"); path.setAttribute("fill", "none"); @@ -25,6 +26,7 @@ const startDrawing = (e) => { }; const draw = (e) => { + e.preventDefault(); if (path) { appendToBuffer(getMousePosition(e)); updateSvgPath(); diff --git a/public/style.css b/public/style.css index 7b93560..be9548c 100644 --- a/public/style.css +++ b/public/style.css @@ -1,3 +1,8 @@ +html, +body { + background-color: dodgerblue; +} + #svgElement { - touch-action: none; + background-color: white; }