Open lucasdinonolte opened 2 years ago
I was just thinking about this, and I think this is the right implementation. We should make sure that the getCanvas
function throws an error if it doesn't have the needed width
and height
, whether that comes from inputs, the getCanvas
arguments, or both. A nice error message with a call for the user to add the dimensions would be very helpful.
I was just thinking about this, and I think this is the right implementation. We should make sure that the
getCanvas
function throws an error if it doesn't have the neededwidth
andheight
, whether that comes from inputs, thegetCanvas
arguments, or both. A nice error message with a call for the user to add the dimensions would be very helpful.
I had the same notion and added some first drafts for error messages. https://github.com/designsystemsinternational/mechanic/pull/146/files#diff-cea56d01b8f19fd6436a19f2b4bbd9d2258c6edbeef3df917df2026fcf1ed520R82 :blush: