Subversion Repositories eFlore/Applications.del

Compare Revisions

Ignore whitespace Rev 1562 → Rev 1563

/trunk/src/org/tela_botanica/del/client/composants/images/DetailImageVue.java
71,22 → 71,25
}
public void setTailleOptimale() {
double fenetreH = Window.getClientHeight();
double fenetreW = Window.getClientWidth();
double rapport = 0;
double photoH = photoPrincipale.getHeight();
double photoW = photoPrincipale.getWidth();
double rapport = 0;
double reduction = 150;
if(photoH >= (fenetreH - reduction) || photoW >= (fenetreW - reduction)) {
if(photoH > photoW) {
if(photoH > (fenetreH - reduction) || photoW > (fenetreW - reduction)) {
if(photoH >= (fenetreH - reduction)) {
rapport = photoW/photoH;
photoH = fenetreH-reduction;
photoW = photoH*rapport;
} else {
}
if(photoW >= (fenetreW - reduction)) {
rapport = photoH/photoW;
photoW = fenetreW-reduction;
photoH = photoW*rapport;