mechanic icon indicating copy to clipboard operation
mechanic copied to clipboard

[WIP] Add export density to canvas renderer

Open lucasdinonolte opened this issue 2 years ago • 2 comments

  • Makes canvas previews crisp on retina displays
  • Allows users to choose the desired pixel density before exporting

lucasdinonolte avatar Sep 02 '22 15:09 lucasdinonolte

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.

runemadsen avatar Sep 02 '22 17:09 runemadsen

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 had the same notion and added some first drafts for error messages. https://github.com/designsystemsinternational/mechanic/pull/146/files#diff-cea56d01b8f19fd6436a19f2b4bbd9d2258c6edbeef3df917df2026fcf1ed520R82 :blush:

lucasdinonolte avatar Sep 02 '22 18:09 lucasdinonolte