Four Js Development Tools Forum

Discussions by product => Genero BDL => Topic started by: Benjamin G. on July 07, 2023, 03:25:28 pm



Title: Centering Image on an array
Post by: Benjamin G. on July 07, 2023, 03:25:28 pm
Hello,

i'm trying to center an image on an array (fglrun 4.01.03 rev-3effeb69)

.per
      IMAGE     a24 = FORMONLY.img.....  ,TITLE="xxxx", JUSTIFY=CENTER, AUTOSCALE, STYLE="centered";  -- fa-var-trash-alt

.4st (https://4js.com/online_documentation/fjs-fgl-manual-html/#fgl-topics/r_fgl_presentation_styles_image_style_attributes.html#r_fgl_presentation_styles_image_style_attributes__row_alignment)

   <Style name="Image.centered">
     <StyleAttribute name="alignment" value="center" />
  </Style>


have trying with STYLE and JUSTIFY and doesn't work for me ?

Any help apprciated ...

Thank you








Title: Re: Centering Image on an array
Post by: Susobh S. on July 07, 2023, 08:33:01 pm
Hi Benjamin,

You can achieve the result using a custom css style in the GBC customization.
Since you already have a style ="centered" defined in the per file, you can attach a css styling to that.

use the below in your sass file
.gbc_style_centered {
    text-align: center;
}

Thanks And Regards
Susobh Sugathan


Title: Re: Centering Image on an array
Post by: Reuben B. on July 10, 2023, 12:48:27 am
Two things to note here ...

1. JUSTIFY is not the solution.  Note the second paragraph in the JUSTIFY section http://4js.com/online_documentation/fjs-fgl-manual-html/#fgl-topics/c_fgl_FSFAttributes_JUSTIFY.html

2. In the GDC, default position for IMAGE in table is center, https://4js.com/support/issue/?id=GDC-4308.   There is a task GBC-3800 to get the GBC behaviour to match GDC.  Where there is a clear difference like this between 3.20 and 4.01 behaviour you should not be shy about reporting a case to support.  The number of reporters is a factor for priority so even though there maybe a simple 3 line workaround via GBC customisation, you should still let us know you had to do that so that we give the issue the attention it deserves.  (It's not a 3 line solution for us as we have to a)  consider the alignment presentation style attribute and the fact that default for GRID is top left and for TABLE it is center! and b) FLIPPED rendering)

3. There is another interesting case we have on the books GBC-4249 that the introduction of STRETCH=X has highlighted, for non-text widgets such as CHECKBOX, RADIOGROUP how should they behave when the grid is stretched and getting consistency with what happens in a TABLE.  I suspect the alignment presentation style attribute will be extended beyond IMAGE to other widgets


Title: Re: Centering Image on an array
Post by: Davin W. on January 26, 2024, 05:25:29 pm
Two things to note here ...

1. JUSTIFY is not the solution.  Note the second paragraph in the JUSTIFY section http://4js.com/online_documentation/fjs-fgl-manual-html/#fgl-topics/c_fgl_FSFAttributes_JUSTIFY.htmlgetting over it (https://gettingoverit.io)

2. In the GDC, default position for IMAGE in table is center, https://4js.com/support/issue/?id=GDC-4308.   There is a task GBC-3800 to get the GBC behaviour to match GDC.  Where there is a clear difference like this between 3.20 and 4.01 behaviour you should not be shy about reporting a case to support.  The number of reporters is a factor for priority so even though there maybe a simple 3 line workaround via GBC customisation, you should still let us know you had to do that so that we give the issue the attention it deserves.  (It's not a 3 line solution for us as we have to a)  consider the alignment presentation style attribute and the fact that default for GRID is top left and for TABLE it is center! and b) FLIPPED rendering)
   
3. There is another interesting case we have on the books GBC-4249 that the introduction of STRETCH=X has highlighted, for non-text widgets such as CHECKBOX, RADIOGROUP how should they behave when the grid is stretched and getting consistency with what happens in a TABLE.  I suspect the alignment presentation style attribute will be extended beyond IMAGE to other widgets


I got it. Thx.