I'm kind of new at this - so if I'm missing something obvious, please be patient. Here's what I'm trying to do:
I have a subfile that is detected in Genie - all divs get assigned class 'cell'. I've taken the 'cell' class and changed the display type to 'flex' to allow for more control over the placement of the contained div. Currently, the 'justify-content' setting is 'flex-end' for all cells.
I want to be able to vary the 'justify-content' so I can control the alignment of columns based on the 'left' value of the parent div.
I've tried to write a script, but it always runs before the screen is rendered - my getElementsByClassName() array is always empty. Where can I place my function call so that it fires after the screen is rendered?
Sorry if this is a noob question, I've only been programming RPG for a few months and this is my first project with Profound and Genie.
Javascript after render
-
- Profound User
- Posts: 25
- Joined: Mon Jul 03, 2017 1:35 pm
- First Name: Ed
- Last Name: Kidhardt
- Company Name: Conestoga Wood
- City: East Earl
- State / Province: Pennsylvania
- Country: United States
- Contact:
-
- Experienced User
- Posts: 2711
- Joined: Wed Aug 01, 2012 8:58 am
- First Name: Scott
- Last Name: Klement
- Company Name: Profound Logic
- City: Milwaukee
- State / Province: Wisconsin
Re: Javascript after render
Hiya Ed,
I'd suggest taking a look at the "JavaScript Coding" section of the documentation if you haven't already. For this specific question, the "Global Events" page would be very helpful.
http://www.profoundlogic.com/docs/displ ... bal+Events
In particular, it's important to note that there are different events in Genie that run at different times. Most of the time, you want to use the "customize" event for changes to the display... but sometimes there are advantages to the other events that run at different times. The above link lists them all.
I'd suggest taking a look at the "JavaScript Coding" section of the documentation if you haven't already. For this specific question, the "Global Events" page would be very helpful.
http://www.profoundlogic.com/docs/displ ... bal+Events
In particular, it's important to note that there are different events in Genie that run at different times. Most of the time, you want to use the "customize" event for changes to the display... but sometimes there are advantages to the other events that run at different times. The above link lists them all.
-
- Profound User
- Posts: 25
- Joined: Mon Jul 03, 2017 1:35 pm
- First Name: Ed
- Last Name: Kidhardt
- Company Name: Conestoga Wood
- City: East Earl
- State / Province: Pennsylvania
- Country: United States
- Contact:
Re: Javascript after render
Exactly what I was looking for - worked like a charm!
Thanks for the help, Scott.
Thanks for the help, Scott.
Who is online
Users browsing this forum: No registered users and 0 guests