Text Size Panel API

Text Size Panel API

Text Size Panel Overview

Allows users to adjust the text to the size they want. This component uses Ranged Panel as a base grade so it has the same component structure as Ranged Panel in aspect of the model, options, selectors and dependencies.

 

On This Page
Still need help?

Join the infusion-users mailing list and ask your questions there.


Adding a Text Size Panel to a Component/Grade

Option 1: Typically the Text Size Panel is integrated into the first discovery tool by supplying it as a type option in an Auxiliary Schema:

"textSize": { "type": "fluid.prefs.textSize", "panel": { "type": "gpii.firstDiscovery.panel.textSize", "container": ".gpiic-fd-prefsEditor-panel-size", "template": "%prefix/rangeTemplate.html", "message": "%prefix/textSize.json" } }

Working in conjunction with the Auxiliary Schema, the type, its default value and range of the text size preference are defined in the Primary Schema:

 

fluid.defaults("gpii.firstDiscovery.schemas.textSize", { gradeNames: ["autoInit", "fluid.prefs.schemas"], schema: { "fluid.prefs.textSize": { "type": "number", "default": 1, "minimum": 0.2, "maximum": 1.2, "divisibleBy": 0.1 } } });

 

Option 2: Adding as a stand alone component:

var myPanel = gpii.firstDiscovery.panel.textSize(container, options);

Grades

The base grades used by the Text Size Panel: