Jump to content
Search Community

Scrambletext length wrong (svg)

vektor test
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

Hi, 

 

I have a small issue with the Scrambletext plugin using the wrong lengths for the text ( in an SVG )

 

Most of the strings start scrambling with too many characters, it also still happens if I define the 'text' parameter 

 

Can't work out why? Is there a workaround to force a specific length?

 

Thought it may be to do with the tspans, but I experimented with removing some and it didn't seem to make a difference

 

?

 

 

See the Pen jvZoqm?editors=1011 by bananafarma00 (@bananafarma00) on CodePen

Link to comment
Share on other sites

That's actually a bit of an illusion due to the fact that there are white space characters at the start and end of the strings. I just updated the codepen-only version of ScrambleTextPlugin so that it trims those by default (you can set trim:false if you DON'T want that behavior) - please clear your cache and give that a shot. Better? 

  • Like 6
Link to comment
Share on other sites

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...