<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>squeezetext UI Component</title><link>https://community.telligent.com/community/11/w/api-documentation/67192/squeezetext-ui-component</link><description /><dc:language>en-US</dc:language><generator>14.0.0.586 14</generator><item><title>squeezetext UI Component</title><link>https://community.telligent.com/community/11/w/api-documentation/67192/squeezetext-ui-component</link><pubDate>Tue, 19 Nov 2019 20:28:45 GMT</pubDate><guid isPermaLink="false">a5a141e6-d5cd-46da-84d3-05c64fddf009</guid><dc:creator>Ben Tiedt</dc:creator><comments>https://community.telligent.com/community/11/w/api-documentation/67192/squeezetext-ui-component#comments</comments><description>Current Revision posted to API Documentation by Ben Tiedt on 11/19/2019 20:28:45&lt;br /&gt;
&lt;hr class="generated-documentation-start" style="border-width:0;" /&gt;&lt;h3&gt;&lt;a id="jQuery_telligent_evolution_ui_components_squeezetext" name="jQuery_telligent_evolution_ui_components_squeezetext"&gt;&lt;/a&gt;jQuery.telligent.evolution.ui.components.squeezetext&lt;/h3&gt;
&lt;p&gt;[[ui JavaScript API Module|UI Component]] which enables text to be squeezed to fit exactly within a defined width before truncation using [[evolutionSqueezeText jQuery Plugin|evolutionSqueezeText]]. The default implementation uses the [[evolutionSqueezeText jQuery Plugin|evolutionSqueezeText plugin]]. [[ui JavaScript API Module|Overrides can be provided]] at the theme level. Text that is too long to squeeze is truncated and provided with a tool tip to show the full content.&lt;/p&gt;
&lt;h3&gt;&lt;a id="Options" name="Options"&gt;&lt;/a&gt;Options&lt;/h3&gt;
&lt;p&gt;Data made available to instances of the component:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;minsize&lt;/code&gt;: Minimum font size to use before truncation, in pixels
&lt;ul&gt;
&lt;li&gt;default: 9&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;minspacing&lt;/code&gt;: : Minimum letter-spacing to use before truncation, in pixels
&lt;ul&gt;
&lt;li&gt;default: -0.5&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;enablespacing&lt;/code&gt;: When enabled, includes letter spacing adjustment attempts when squeezing
&lt;ul&gt;
&lt;li&gt;default: true&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;resetonfailure&lt;/code&gt;: When enabled, text that cannot be squeezed within a container is reset to its original font size and letter spacing
&lt;ul&gt;
&lt;li&gt;default: false&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;truncateonfailure&lt;/code&gt;: When enabled, text that cannot be squeezed within a container is truncated
&lt;ul&gt;
&lt;li&gt;default: true&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;&lt;a id="Example" name="Example"&gt;&lt;/a&gt;Example&lt;/h3&gt;
&lt;h4&gt;&lt;a id="Static_Example_using_ui-masonry" name="Static_Example_using_ui-masonry"&gt;&lt;/a&gt;Static Example using ui-masonry&lt;/h4&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;div class=&amp;quot;ui-squeezetext&amp;quot; data-minsize=&amp;quot;10&amp;quot; style=&amp;quot;width:300px&amp;quot;&amp;gt;
    The quick brown fox jumped over the lazy dog.
&amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;h3&gt;&lt;a id="Default_Implementation" name="Default_Implementation"&gt;&lt;/a&gt;Default Implementation&lt;/h3&gt;
&lt;p&gt;For reference purposes or as the basis for an override:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;jQuery.telligent.evolution.ui.components.squeezetext = {
    setup: function() {},
    add: function(elm, options) {
        $(elm).evolutionSqueezeText({
            &amp;#39;minSize&amp;#39;: (parseFloat(options.minsize) || $.fn.evolutionSqueezeText.defaults.minSize),
            &amp;#39;minSpacing&amp;#39;: (parseFloat(options.minspacing) || $.fn.evolutionSqueezeText.defaults.minSpacing),
            &amp;#39;enableSpacing&amp;#39;: (options.enablespacing !== undef ? options.enablespacing === &amp;#39;true&amp;#39; : $.fn.evolutionSqueezeText.defaults.enableSpacing),
            &amp;#39;resetOnFailure&amp;#39;: (options.resetonfailure !== undef ? options.resetonfailure === &amp;#39;true&amp;#39; : $.fn.evolutionSqueezeText.defaults.resetOnFailure),
            &amp;#39;truncateOnFailure&amp;#39;: (options.truncateonfailure !== undef ? options.truncateonfailure === &amp;#39;true&amp;#39; : $.fn.evolutionSqueezeText.defaults.truncateOnFailure),
            &amp;#39;onFailure&amp;#39;: function() {
                $(this).attr(&amp;#39;data-tip&amp;#39;, $(this).text()).evolutionTip();
            }
        });
    }
};
&lt;/code&gt;&lt;/pre&gt;

&lt;hr class="generated-documentation-end" style="border-width:0;" /&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item></channel></rss>