Hello,
For my html report, I have set images to fit to the container (so no width predefined) and the container having a width of 100%. It works well!
During the report generation, Medini asks me if I want to scale images that are too large. It works well as almost all of my images are correctly scaled to the container's width. But for very very large diagrams, the image is lightly truncated (images that have for instance 1800width).
I have found a way to fix it by adding an onRender script to the image saying:
this.width = "100%";
But it applies it to all images of the table, and for the ones which are not so large, it appears with big zoom in...
So my question is: how can I get the width of the image and apply the above script only for a width higher than XX (e.g. 1200) ? Something like:
if(this.width > 1200){
this.width = "100%";
} I don't know how to get the condition as a number as it seems to be a string with a unit that i don't know (px?mm?cm?in?....). Or even if i can get it like that actually.
Thx for your help.