timer action not changing opacity of hotspot

Q&A about the latest versions
Post Reply
User avatar
Multimediafabrik
Posts: 63
Joined: Thu Jun 21, 2018 11:28 pm

for reference see: viewtopic.php?f=6&t=14993
variables: "invisible_node" is the node that should be invisible
"visible_node" is the node that should be visible.

I got everything to work and now a want to implement a new feature: instead of the hotspots to just hide, i want them to slowly disappear.
For this i added a manual Timer with a few actions:
timer_actions.png
timer_actions.png (6.48 KiB) Viewed 2669 times
1) start the timer with a value of 1 second, once the "invisible_node" variable changes.
timer_action1.png
timer_action1.png (7.63 KiB) Viewed 2669 times
2) the same as the 1st one, just with the "visible_node" variable.
3) once the timer is active, change the opacity to 0 in a time of 1 second, if the hotspot url = "invisible_node"
action 3.png
action 3.png (33.91 KiB) Viewed 2669 times
4) same as 3), except it changes to opacity to 1 in a time of 1 second, if the hotspot url = "visible_node"
5)once the timer deactivates, set the visibility to false, if the hotspot url = "invisible_node"
action5.png
action5.png (32.67 KiB) Viewed 2669 times
6)same as 5), except it changes the visibility to true on timer activation, if the hotspot url = "visible_node"

i dont get, why i doesnt work. The Hotspots hide just fine, but the dont fade out. Can anyone help me out here?
Branigan
Posts: 231
Joined: Tue May 19, 2020 3:43 pm

Not looked at your code at all, but are you using Transitions to fade out (you didn't show you had it selected in your logic block screenshot)?

Is so see the answer to your reply to my Transitions problem. Might be the timing problem I had.

Try triggering everything on a test button after it's all up and running, and if it works then you might need to introduce a delay somewhere to let things 'wake up'?
User avatar
Multimediafabrik
Posts: 63
Joined: Thu Jun 21, 2018 11:28 pm

Not looked at your code at all, but are you using Transitions to fade out (you didn't show you had it selected in your logic block screenshot)?

Is so see the answer to your reply to my Transitions problem. Might be the timing problem I had.

Try triggering everything on a test button after it's all up and running, and if it works then you might need to introduce a delay somewhere to let things 'wake up'?
The transistion is in the logic box and is called "Übergang" which is german for transition
User avatar
Multimediafabrik
Posts: 63
Joined: Thu Jun 21, 2018 11:28 pm

edit: i realized, the Timer isnt the problem. Its the transition of the opacity. When my logic block for the opacity triggers and sets the opacity to 0, it just instantly hides the element, even tho I set a transition duration.
opacity.png
opacity.png (13.25 KiB) Viewed 2637 times
Branigan
Posts: 231
Joined: Tue May 19, 2020 3:43 pm

Multimediafabrik wrote: Fri Aug 21, 2020 1:54 pm edit: i realized, the Timer isnt the problem. Its the transition of the opacity. When my logic block for the opacity triggers and sets the opacity to 0, it just instantly hides the element, even tho I set a transition duration.
opacity.png
...which is exactly the same problem I had. As well as a banner sliding in out on a Transition, I'd also tried to have it's Opacity fade over 1 second.

Same result of: 'Instant' Transitions.

Looks, walks and quacks like a bug... :wink:
User avatar
Multimediafabrik
Posts: 63
Joined: Thu Jun 21, 2018 11:28 pm

Branigan wrote: Fri Aug 21, 2020 2:47 pm
Multimediafabrik wrote: Fri Aug 21, 2020 1:54 pm edit: i realized, the Timer isnt the problem. Its the transition of the opacity. When my logic block for the opacity triggers and sets the opacity to 0, it just instantly hides the element, even tho I set a transition duration.
opacity.png
...which is exactly the same problem I had. As well as a banner sliding in out on a Transition, I'd also tried to have it's Opacity fade over 1 second.

Same result of: 'Instant' Transitions.

Looks, walks and quacks like a bug... :wink:
Really does seem like a bug. Did you find a workaround, as you wrote "problem i had"?
Branigan
Posts: 231
Joined: Tue May 19, 2020 3:43 pm

Multimediafabrik wrote: Fri Aug 21, 2020 3:13 pm Really does seem like a bug. Did you find a workaround, as you wrote "problem i had"?
I used a timer that had been ticking for about a second as my trigger (0.35 seconds with a Mod[3] on it), when everything appeared to have been loaded/woken up, which is why I suggested either adding a delay somewhere, or better still: test triggering by a button press to see if it should work, and the (possible) 'bug' is the problem, not something else in your code.
User avatar
Hopki
Gnome
Posts: 13005
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Due to how CSS works, if an element has, for example, a move position logic block and an alpha logic block but only the alpha logic block has a transition then it will not work.

You need to set the move position logic block to have a transition as well. Of course if you don’t want a transition just set the time to 0.

So any active logic block that can have a transition must have this selected.

If you have anything different to this then please post your skin.
Regards,
Garden Gnome Support
If you send an e-mail to support please send a link to the forum post for reference.
support@ggnome.com
https://ggnome.com/wiki/documentation/
Branigan
Posts: 231
Joined: Tue May 19, 2020 3:43 pm

Hopki wrote: Fri Aug 21, 2020 4:02 pm If you have anything different to this then please post your skin.
So as to not stomp over this thread any more than I already have, my version of the (or a different?) problem is in my thread here: viewtopic.php?f=6&t=14909
User avatar
Multimediafabrik
Posts: 63
Joined: Thu Jun 21, 2018 11:28 pm

Hopki wrote: Fri Aug 21, 2020 4:02 pm Due to how CSS works, if an element has, for example, a move position logic block and an alpha logic block but only the alpha logic block has a transition then it will not work.

You need to set the move position logic block to have a transition as well. Of course if you don’t want a transition just set the time to 0.

So any active logic block that can have a transition must have this selected.

If you have anything different to this then please post your skin.
Regards,
Hey Hopki,
I added a transition to all of them now, but it still doesnt work. Same problem as before. it just instantly changes the opacity. Could you have a look at my skin?
How it should be: when 2 Hotspots are close enough (in pixel -> skin-variable: node_hide_distance) one of them should fade out its opacity over the course of a second and then change its visibility to false. When their distance is big enough, they should show the same way, just reversed(visibility=true -> opacity 1, transtion 1sec). Everything except the opacity transition works. Right now the only Hotspot-template used is "Hotspot S"
-Jonas

EDIT: I works when the hotspot appears, but not when it goes invisible. I set a timeout, that it first fades out before it changes its visibility, but it doesnt seem to work. (added the new skin version)
MAIN_360ty_zoom.ggsk
(16.49 KiB) Downloaded 113 times
User avatar
Hopki
Gnome
Posts: 13005
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Hi Jonas,
Thanks for posting your skin.
Things to note, if you have a visible logic block and an alpha logic block, then you will not see any transition effect, once it has hidden its hidden.
Also, the container all the Hotspot Templates are in has logic blocks the same as the Hotspot Templates?
As a rule Hotspot templates should not be child elements in the tree.

As an example, I moved the Hotspot Template "Hotspot S", out of the container so it is a parent element
In the Hotspot Template, I removed all logic blocks, as said I see no need for them.
All the rectangles now just have your invisible node logic block and now when you zoom in and out you see the 1-second transition with the Alpha.
Regards,
Garden Gnome Support
If you send an e-mail to support please send a link to the forum post for reference.
support@ggnome.com
https://ggnome.com/wiki/documentation/
User avatar
Multimediafabrik
Posts: 63
Joined: Thu Jun 21, 2018 11:28 pm

Hopki wrote: Mon Aug 24, 2020 3:26 pm Hi Jonas,
Thanks for posting your skin.
Things to note, if you have a visible logic block and an alpha logic block, then you will not see any transition effect, once it has hidden its hidden.
Also, the container all the Hotspot Templates are in has logic blocks the same as the Hotspot Templates?
As a rule Hotspot templates should not be child elements in the tree.

As an example, I moved the Hotspot Template "Hotspot S", out of the container so it is a parent element
In the Hotspot Template, I removed all logic blocks, as said I see no need for them.
All the rectangles now just have your invisible node logic block and now when you zoom in and out you see the 1-second transition with the Alpha.
Regards,
Thank you Hopki :) It works now!
Is there anyway to check if a variable includes the value of another? something like: if(variable.includes($(hu)) == true)
Can i use placeholders in custom javascript when i use GO TO URL? That would be very helpfull.
Also, is there a way to use a variable as a color for a rectangleborder? I tried it in the color picker and in the custom style section but both dont work.
Post Reply