---
title: "Frendhi (@fsdnr) | Hashnode"
description: "Web Developer. Read the latest articles by Frendhi on Hashnode."
url: "https://hashnode.com/@fsdnr"
---

@fsdnr

# Frendhi

@fsdnr · Joined September 2020

Web Developer

## Comments

[Great article! Thanks! I've made the "fixed-width" version, by setting the canvas size to copy it's parent wrapper's size. ctx.canvas.width = canvas.offsetWidth; ctx.canvas.height = canvas.offsetHeight; https://codepen.io/frendhisaido\_1470415284/pen/dyXypKB But I'm still not sure why if the canvas is inside any parent that has a relative position, the mouse draw precision will be off by a few pixels.](https://hashnode.com/posts/javascript-mouse-drawing-on-the-canvas/5f7d5154eba2f86adc0b6465/comment/5f7d8e2494f39f6ab9fbfdf3)

Comment · Article · Oct 7, 2020 · [JavaScript mouse drawing on the canvas 👨‍🎨](https://hashnode.com/posts/javascript-mouse-drawing-on-the-canvas/5f7d5154eba2f86adc0b6465)
