CAUCA-9-1-1 / survip

SURVI-Prevention Desktop
2 stars 3 forks source link

Reporting - Cannot fix a size to logo or images (height is hardcoded) #547

Closed jocelyncardinal closed 5 years ago

jocelyncardinal commented 5 years ago

The height of the Logo is always 100 pixel and for an image 400 pixel.

Capture d’écran, le 2019-05-22 à 16.07.56.png

I tried to override it in the report using table without success.

Logo ... Capture d’écran, le 2019-05-22 à 16.03.43.png

Image ... Capture d’écran, le 2019-05-22 à 16.05.47.png

Image ... Capture d’écran, le 2019-05-22 à 16.06.18.png

jocelyncardinal commented 5 years ago

I don't know yet what would be the best solution. Here, some proposal to discuss ...

  1. May be remove the the hardcoded height from fonction GetTag() or GetTagForLogo() used to generated to HTML. I am not sure if then it would be possible to set the size of the image by using the table/cell witdh and height ???

  2. Use the the Image Icon from the report editor from Capture d’écran, le 2019-05-22 à 16.19.44.png

iamkinetic commented 5 years ago

Your number 2 would be what I would try first.

jocelyncardinal commented 5 years ago

Would be the best to me too ... Not the the dialog prevent us to not enter a URL. Can we use that field to identify the image?

iamkinetic commented 5 years ago

Url would be @mainbuilding.siteplan@

jocelyncardinal commented 5 years ago

Good! And for other images, the URL would be ...

@MainBuilding.FireSafetyLogo@ @BuildingAnomalyPicture.DataUri@ @BuildingParticularRiskPicture.DataUri@

Jeepsboucher commented 5 years ago

@jocelyncardinal Finalement, on doit changer la grandeur avec le tag. Il suffit de rajouter un point avant de refermer le tag et d'inscrire la hauteur que l'on veut avoir Ex: @BuildingParticularRiskPicture.DataUri.400@ Il y a toujours les hauteurs par défaut , 100 pour le logo et 400 pour un tag, donc même si l'on ne change pas un rapport on peut toujours l'utiliser.

jocelyncardinal commented 5 years ago

D’accord, ça me semble une très bonne idée! On inscrit seulement la hauteur (Height en HTML) et on n’inscrit rien pour largeur (Width) qui ainsi « s’ajuste » automatiquement pour conserver l’aspect ratio - comportement par défaut lorsqu’on inscrit pas Witdh en HTML il me semble

jocelyncardinal commented 5 years ago

D’accord, ça me semble une très bonne idée! On inscrit seulement la hauteur (Height en HTML) et on n’inscrit rien pour largeur (Width) qui ainsi « s’ajuste » automatiquement pour conserver l’aspect ratio - comportement par défaut lorsqu’on inscrit pas Witdh en HTML il me semble