Skip to content

rendertom/Overflow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

Overflow

A helper class to fit overflowing text inside the textbox area, by either expanding the textbox height or compacting the font size.

API

  • exists returns true whether textbox contains overflowing text, false otherwise,
  • expand modifies the textbox height to fit the overflowing text,
  • compact scales font size down until all the text fits inside the textbox.
// Check whether textLayer contains overflowing text
Overflow.exists(textLayer);

// Modify the textbox height to fit the overflowing text
Overflow.expand(textLayer);

// Scale font size down until all the text fits inside the textbox
Overflow.compact(textLayer);

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published