vega icon indicating copy to clipboard operation
vega copied to clipboard

Allow Usage Of Scale Factor For Non-Static Canvas

Open lsh opened this issue 3 years ago • 1 comments

The View API only allows for a scaleFactor for static images. However sometimes rendering at a larger logical size in the browser is useful. Currently in the renderer, if the Canvas is being rendered in the DOM, the scaleFactor is defined as the devicePixelRatio.

A solution is to add an options.scaleFactor parameter to the View constructor (defaults to devicePixelRatio) and use it in the CanvasRenderer.

lsh avatar Sep 26 '22 21:09 lsh

cc: @jheer any opinion here?

kanitw avatar Oct 24 '22 23:10 kanitw