butiran-✗

size div to canvas

· 1 min read · edit

An experiment to understand whether changing parent div will effect canvas child.

mismatched size

It follows the value of width and height but not style.width and style.height, e.g. in rect() function. Drawing shapes, e.g. arc, will also be distorted when element and sytle sizes do not match.

manual change

To overcome the problem a manual change is tried.

summaries

  • Right solution is still not found.
  • Manual change is currently used in 26b56 .