nrdvana / perl-App-SlideServer

Serve HTML slides and synchronize clients via websocket
3 stars 0 forks source link

Auto-size div.slide tags for optimal wrapping #1

Open nrdvana opened 1 year ago

nrdvana commented 1 year ago

Currently, the browser decides how wide to make a div.slide tag based on its content. Sometimes the browser chooses to make the slide really wide to accommodate the longest string

  * Really Long Lines Of Text -----------------------------------
  * Another really long line -----------------------------------

Other times it wraps the lines in many places creating a tall column slide. The most visually appealing ratio is usually somewhere in the middle.

  * A long line
    of text that
    wraps too many
    times.
  * Another long
    line of text
    and so on

I want to use javascript to size the slide to various widths and check the visual appeal of the lines that got wrapped, choosing the best one.