Subscribe for automatic updates: RSS icon RSS

Login icon Sign in for full access | Help icon Help
Advanced search

Pages: [1]
  Reply  |  Print  
Author Topic: Centering Image on an array  (Read 5588 times)
Benjamin G.
Posts: 98


« 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








* center4js.png (7.97 KB, 514x257 - viewed 1521 times.)
Susobh S.
Posts: 22


« Reply #1 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
Reuben B.
Four Js
Posts: 1062


« Reply #2 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

Product Consultant (Asia Pacific)
Developer Relations Manager (Worldwide)
Author of https://4js.com/ask-reuben
Contributor to https://github.com/FourjsGenero
Davin W.
Posts: 1


« Reply #3 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

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.
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines