Aug 24, 2023 Replies: 11 Ola NB: Updated Demo & B4xlib on this post: BANanoCSSUtils - Utility Helpers & Animations on any BANanoElement Hi there Demo on Vercel This b4xlib does similar functions as the CSSUtils in terms of enabling one to change BANanoElement styling. Added to that we have added some animation classes so that you can animate your BANano WebApps without any extra dependencies except anime.js. For a demo about... www.b4x.com We will use BANanoAnimeJS.. Code: Copy Private Sub btnSetLayoutAnimated_Click (e As BANanoEvent) SHIonBaseElement1.SetLayoutAnimated(2000, "20px", "20px", "400px", "200px") End Sub Last edited: Aug 24, 2023 Click to expand...
Ola NB: Updated Demo & B4xlib on this post: BANanoCSSUtils - Utility Helpers & Animations on any BANanoElement Hi there Demo on Vercel This b4xlib does similar functions as the CSSUtils in terms of enabling one to change BANanoElement styling. Added to that we have added some animation classes so that you can animate your BANano WebApps without any extra dependencies except anime.js. For a demo about... www.b4x.com We will use BANanoAnimeJS.. Code: Copy Private Sub btnSetLayoutAnimated_Click (e As BANanoEvent) SHIonBaseElement1.SetLayoutAnimated(2000, "20px", "20px", "400px", "200px") End Sub
Mashiane Expert Licensed User Longtime User Aug 24, 2023 #2 SetLayoutAnimatedRadius This is the same as SetLayoutAnimated but includes the radius so that you can change it. Code: Copy Private Sub btnSetLayoutAnimatedRadius_Click (e As BANanoEvent) SHIonBaseElement1.SetLayoutAnimatedRadius(2000, "20px", "20px", "400px", "200px", "20px") End Sub
SetLayoutAnimatedRadius This is the same as SetLayoutAnimated but includes the radius so that you can change it. Code: Copy Private Sub btnSetLayoutAnimatedRadius_Click (e As BANanoEvent) SHIonBaseElement1.SetLayoutAnimatedRadius(2000, "20px", "20px", "400px", "200px", "20px") End Sub
Mashiane Expert Licensed User Longtime User Aug 24, 2023 #3 SetTopAnimated Change the Top position of the Element Code: Copy Private Sub btnSetTopAnimated_Click (e As BANanoEvent) SHIonBaseElement1.SetTopAnimated(2000, "100px") End Sub
SetTopAnimated Change the Top position of the Element Code: Copy Private Sub btnSetTopAnimated_Click (e As BANanoEvent) SHIonBaseElement1.SetTopAnimated(2000, "100px") End Sub
Mashiane Expert Licensed User Longtime User Aug 24, 2023 #4 SetLeftAnimated Code: Copy Private Sub btnSetLeftAnimated_Click (e As BANanoEvent) SHIonBaseElement1.SetLeftAnimated(2000, "100px") End Sub
SetLeftAnimated Code: Copy Private Sub btnSetLeftAnimated_Click (e As BANanoEvent) SHIonBaseElement1.SetLeftAnimated(2000, "100px") End Sub
Mashiane Expert Licensed User Longtime User Aug 24, 2023 #5 SetWidthAnimated & SetHeightAnimated Code: Copy Private Sub btnSetWidthAnimated_Click (e As BANanoEvent) SHIonBaseElement1.SetWidthAnimated(2000, "300px") End Sub Private Sub btnSetHeightAnimated_Click (e As BANanoEvent) SHIonBaseElement1.SetHeightAnimated(2000, "100px") End Sub
SetWidthAnimated & SetHeightAnimated Code: Copy Private Sub btnSetWidthAnimated_Click (e As BANanoEvent) SHIonBaseElement1.SetWidthAnimated(2000, "300px") End Sub Private Sub btnSetHeightAnimated_Click (e As BANanoEvent) SHIonBaseElement1.SetHeightAnimated(2000, "100px") End Sub
Mashiane Expert Licensed User Longtime User Aug 24, 2023 #6 SetColorAnimated NB: Should be hex value Code: Copy Private Sub btnSetColorAnimated_Click (e As BANanoEvent) SHIonBaseElement1.SetColorAnimated(2000, "#b0e0e6".ToUpperCase, "#fe4a49".ToUpperCase) End Sub Last edited: Aug 24, 2023
SetColorAnimated NB: Should be hex value Code: Copy Private Sub btnSetColorAnimated_Click (e As BANanoEvent) SHIonBaseElement1.SetColorAnimated(2000, "#b0e0e6".ToUpperCase, "#fe4a49".ToUpperCase) End Sub
Mashiane Expert Licensed User Longtime User Aug 24, 2023 #7 SetAlphaAnimated Code: Copy Private Sub btnSetAlphaAnimated_Click (e As BANanoEvent) SHIonBaseElement1.SetAlphaAnimated(2000, 0.5) End Sub
SetAlphaAnimated Code: Copy Private Sub btnSetAlphaAnimated_Click (e As BANanoEvent) SHIonBaseElement1.SetAlphaAnimated(2000, 0.5) End Sub
Mashiane Expert Licensed User Longtime User Aug 24, 2023 #8 SetRotationAnimated Code: Copy Private Sub btnSetRotateAnimated_Click (e As BANanoEvent) SHIonBaseElement1.SetRotationAnimated(2000, 45) End Sub
SetRotationAnimated Code: Copy Private Sub btnSetRotateAnimated_Click (e As BANanoEvent) SHIonBaseElement1.SetRotationAnimated(2000, 45) End Sub
Mashiane Expert Licensed User Longtime User Aug 24, 2023 #9 SetRadiusAnimated Code: Copy Private Sub btnSetRadiusAnimated_Click (e As BANanoEvent) SHIonBaseElement1.SetRadiusAnimated(2000, "50%") End Sub
SetRadiusAnimated Code: Copy Private Sub btnSetRadiusAnimated_Click (e As BANanoEvent) SHIonBaseElement1.SetRadiusAnimated(2000, "50%") End Sub
Mashiane Expert Licensed User Longtime User Aug 24, 2023 #10 SetTextSizeAnimated Code: Copy Private Sub btnTextSizeAnimated_Click (e As BANanoEvent) Log(BANanoCSSUtils.GetStyleProperty(SHIonBaseElement1.Element, "font-size")) SHIonBaseElement1.SetTextSizeAnimated(2000, "60px") End Sub
SetTextSizeAnimated Code: Copy Private Sub btnTextSizeAnimated_Click (e As BANanoEvent) Log(BANanoCSSUtils.GetStyleProperty(SHIonBaseElement1.Element, "font-size")) SHIonBaseElement1.SetTextSizeAnimated(2000, "60px") End Sub
Mashiane Expert Licensed User Longtime User Aug 24, 2023 #11 SetVisibleAnimated This changes the "opacity" of the element between 1 (visible) and 0 (not visible)
Mashiane Expert Licensed User Longtime User Aug 24, 2023 #12 SetScaleAnimated Code: Copy Private Sub btnSetScaleAnimated_Click (e As BANanoEvent) imgDiv.SetScaleAnimated(2000, 1, 2) End Sub For this we set a background image to a div and then scale it.
SetScaleAnimated Code: Copy Private Sub btnSetScaleAnimated_Click (e As BANanoEvent) imgDiv.SetScaleAnimated(2000, 1, 2) End Sub For this we set a background image to a div and then scale it.