Skip to content

Latest commit

 

History

History

examples

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Examples

In addition to the examples in the main readme.

Word lists

This example demonstrates programmatically generated Big As URLs.

By default, this example lists multiplication tables from 1 to 12, and then shows the selected table as a set of flash cards, in pairs of "questions" (a × b) and "answers" (a × b = c).

Parameters

You can optionally specify parameters in the query string of the examples/multiplication URL to customize behavior.

In these paremeters, the term multiplicand refers to the first factor and multiplier refers to the second factor:

multiplicand × multiplier

(acknowledging that not everyone agrees with this order)

interval

Automates page flipping, specifying the interval in seconds between flips.

Default: 0 (manual page flipping)

Example:

Even with automatic page flipping, you can still manually flip between pages. For example, if you quickly manually flip past some pages, automatic page flipping will then resume.

Note: This is simply a "passthrough" to the underlying Big As interval parameter.

maxMultiplicand

Maximum multiplicand.

Default: 12

Example:

maxMultiplier

Maximum multiplier.

Default: 12

minMultiplicand

Minimum multiplicand.

Default: 1

minMultiplier

Minimum multiplier.

Default: 1

multiplicand

Go directly to the table for a specific multiplicand, bypassing the list of tables.

Examples:

To do

  • New random parameter to change the next/previous page behavior to go to a random page instead.

Web developers: this example uses the formatSVGElementsByClassName() function to format multiple SVG elements based on class name.

This example demonstrates two problems with Big As:

  • Big As shrinkwraps to the bounding box of the text, which encompasses the full line height of the text, which might be more than the area actually occupied by the text glyphs. For instance, if the text doesn't include characters with descenders (such as a lowercase "g"), then the SVG element will have some unused whitespace at the bottom. If you don't like this, then you need to manually apply formatting.
  • On the mobile Safari browser, the serif word "PATTY" isn't the same width as other words. I don't understand why. It's the same width on desktop browsers.