Jump to content
Search Community

scrambletext plugin length is different and thus causing re-paints

flowen
Moderator Tag

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

Posted

hey guys,

 

Using scramble text to translate Korean text to english text. The size of the characters are different -> paragraphs get shorter -> causes the page change height ->  and thus causing reflows/repaints and more unwanted behaviour. 

 

You can see this happening live on shinbyeong.com

 

Anyone has a clue how to fix this? I could measure all heights and set them inline (+ on resize events). 

 

I wonder if there's maybe a more elegant solution..

 

thanks :) 

 

* happy greensock supporter

 

 

 

 

See the Pen BOxNWN by flowen (@flowen) on CodePen.

Posted
12 minutes ago, flowen said:

I could measure all heights and set them inline (+ on resize events). 

 

That's probably your best option.

 

The only way to really prevent that is to use a monospace font with the same amount of characters, but that wouldn't work for what your doing because the number of characters would differ, and there's a size difference between English and Korean characters.

  • Like 5
Posted
20 hours ago, OSUblake said:

 

That's probably your best option.

 

The only way to really prevent that is to use a monospace font with the same amount of characters, but that wouldn't work for what your doing because the number of characters would differ, and there's a size difference between English and Korean characters.

 

Exactly what I thought (except for the monospace font, let's see if I can remember that). 

 

Alright, this it is :) Thanks @OSUblake !

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...