peterflynn / svg-preview

Brackets extension to live preview SVG files inline as you edit them
46 stars 8 forks source link

Viewer is too small when svg height and width are defined as cm units #8

Closed lkcampbell closed 9 years ago

lkcampbell commented 10 years ago

OS: Mac OSX Mavericks

Brackets Version: sprint 38 experimental build 0.38.0-12606 (release 4df8afdad)

Extension Version: 1.1.2

Repro Steps:

  1. Open a SVG file with the following content (a W3C spec example): https://gist.github.com/lkcampbell/f12f06746602a83cc8af

Expected Results: Should be able to see the entire SVG file.

Observed Results: The height and width of the SVG viewer are too small to see the full image.

Other Notes: Changing the height and width to bigger numbers, with no units or pixel units, makes the SVG viewer larger.

AmeliaBR commented 9 years ago

More generally, the problem seems to be that units are ignored; the height and width are always interpretted as pixels.

(Confirmed on SVG Preview v1.2, Brackets 1.1).

peterflynn commented 9 years ago

Fixed in 1.3 thanks to @AmeliaBR!

lkcampbell commented 9 years ago

Confirmed as fixed, thanks.