Is it possible to use NON Pixel based values in GoJS?
For example, I have to write some code that add’s picture elements to a GoJS canvas. Problem is, the measurments I get handed to me are in Millimeters.
I’m currently adding pictures using the following:
Thanks Simon. It’s ok I’ve created a typescript library for the project that uses a known width/height off-screen div to calculate what I need to know.
Basically, all our measurments are in mm, so I create a 1mm by 1mm off screen div, then use the HTMLElement properties to find out how many pixels width/height it is.
I then use the 2 figures to derive a couple of conversion functions.
It might provide more precise conversion number if you used an HTML element that was 100mm by 100mm. Or 1000x1000. I haven’t tried this to confirm it, but that is what I would expect.