ucsd-cse112/team13

View on GitHub
docs/api/CoreSliderElement.html

Summary

Maintainability
Test Coverage
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>JSDoc: Class: CoreSliderElement</title>

    <script src="scripts/prettify/prettify.js"> </script>
    <script src="scripts/prettify/lang-css.js"> </script>
    <!--[if lt IE 9]>
      <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
    <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>

<body>

<div id="main">

    <h1 class="page-title">Class: CoreSliderElement</h1>

    




<section>

<header>
    
        <h2><span class="attribs"><span class="type-signature"></span></span>CoreSliderElement<span class="signature">()</span><span class="type-signature"></span></h2>
        
            <div class="class-description">An element that selects a range of values by sliding... it's a slider.</div>
        
    
</header>

<article>
    <div class="container-overview">
    
        

    
    <h2>Constructor</h2>
    

    
    <h4 class="name" id="CoreSliderElement"><span class="type-signature"></span>new CoreSliderElement<span class="signature">()</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    Creates a CoreSlider element.
</div>













    <h5 class="subsection-title">Properties:</h5>

    

<table class="props">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>step</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>


            
            </td>

            

            

            <td class="description last">the size of the intervals for the value's valid range.
                             The attribute name is 'step'.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>min</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>


            
            </td>

            

            

            <td class="description last">the minimum value.
                             The attribute name is 'min'.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>max</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>


            
            </td>

            

            

            <td class="description last">the maximum value.
                             The attribute name is 'max'.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>value</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>


            
            </td>

            

            

            <td class="description last">the current value.
                             The attribute name is 'value'.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>disabled</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>

            

            

            <td class="description last">whether this can be used.
                             The attribute name is 'disabled'.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>vertical</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>

            

            

            <td class="description last">whether to display vertically.
                             The attribute name is 'vertical'.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>rainbow</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>

            

            

            <td class="description last">whether to display in a bunch of colors.
                             The attribute name is 'rainbow'.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>color</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            

            

            <td class="description last">the color of the slider.
                             The attribute name is 'color'.</td>
        </tr>

    
    </tbody>
</table>




<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="core-slider_CoreSliderElement.js.html">core-slider/CoreSliderElement.js</a>, <a href="core-slider_CoreSliderElement.js.html#line80">line 80</a>
    </li></ul></dd>
    

    

    

    
</dl>




















    
    </div>

    

    

    

    

    

    

    

    
        <h3 class="subsection-title">Methods</h3>

        
            

    

    
    <h4 class="name" id="connectedCallback"><span class="type-signature"></span>connectedCallback<span class="signature">()</span><span class="type-signature"></span></h4>
    

    















<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="core-slider_CoreSliderElement.js.html">core-slider/CoreSliderElement.js</a>, <a href="core-slider_CoreSliderElement.js.html#line165">line 165</a>
    </li></ul></dd>
    

    

    

    
</dl>




















        
            

    

    
    <h4 class="name" id="getSliderProgressRatio"><span class="type-signature"></span>getSliderProgressRatio<span class="signature">(e)</span><span class="type-signature"> &rarr; {Number}</span></h4>
    

    



<div class="description">
    Depending on whether it is vertical, calculates the proportional
value from the slider to the moving thumb.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>e</code></td>
            

            <td class="type">
            
                
<span class="param-type">Event</span>


            
            </td>

            

            

            <td class="description last">the input event</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="core-slider_CoreSliderElement.js.html">core-slider/CoreSliderElement.js</a>, <a href="core-slider_CoreSliderElement.js.html#line301">line 301</a>
    </li></ul></dd>
    

    

    

    
</dl>















<h5>Returns:</h5>

        
<div class="param-desc">
    the progress along the bar for the thumb. The value ranges
                   between [0, 1] and goes top-to-bottom and left-to-right.
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Number</span>


    </dd>
</dl>

    





        
            

    

    
    <h4 class="name" id="onMouseDown"><span class="type-signature"></span>onMouseDown<span class="signature">(e)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    Is called when the mouse is clicked on the thumb.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>e</code></td>
            

            <td class="type">
            
                
<span class="param-type">Event</span>


            
            </td>

            

            

            <td class="description last">the input event</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="core-slider_CoreSliderElement.js.html">core-slider/CoreSliderElement.js</a>, <a href="core-slider_CoreSliderElement.js.html#line213">line 213</a>
    </li></ul></dd>
    

    

    

    
</dl>




















        
            

    

    
    <h4 class="name" id="onMouseMove"><span class="type-signature"></span>onMouseMove<span class="signature">(e)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    Is called when the mouse moves. This is only registered when onMouseDown is called.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>e</code></td>
            

            <td class="type">
            
                
<span class="param-type">Event</span>


            
            </td>

            

            

            <td class="description last">the input event</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="core-slider_CoreSliderElement.js.html">core-slider/CoreSliderElement.js</a>, <a href="core-slider_CoreSliderElement.js.html#line227">line 227</a>
    </li></ul></dd>
    

    

    

    
</dl>




















        
            

    

    
    <h4 class="name" id="onMouseUp"><span class="type-signature"></span>onMouseUp<span class="signature">(e)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    Is called when the mouse is released anywhere.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>e</code></td>
            

            <td class="type">
            
                
<span class="param-type">Event</span>


            
            </td>

            

            

            <td class="description last">the input event</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="core-slider_CoreSliderElement.js.html">core-slider/CoreSliderElement.js</a>, <a href="core-slider_CoreSliderElement.js.html#line236">line 236</a>
    </li></ul></dd>
    

    

    

    
</dl>




















        
            

    

    
    <h4 class="name" id="onThumbMove"><span class="type-signature"></span>onThumbMove<span class="signature">(e)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    Is called when the thumb is moving (for both the mouse AND touch)
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>e</code></td>
            

            <td class="type">
            
                
<span class="param-type">Event</span>


            
            </td>

            

            

            <td class="description last">the input event that moved the thumb</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="core-slider_CoreSliderElement.js.html">core-slider/CoreSliderElement.js</a>, <a href="core-slider_CoreSliderElement.js.html#line312">line 312</a>
    </li></ul></dd>
    

    

    

    
</dl>




















        
            

    

    
    <h4 class="name" id="onThumbStart"><span class="type-signature"></span>onThumbStart<span class="signature">()</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    Is called when the thumb should move (for both the mouse AND touch)
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="core-slider_CoreSliderElement.js.html">core-slider/CoreSliderElement.js</a>, <a href="core-slider_CoreSliderElement.js.html#line288">line 288</a>
    </li></ul></dd>
    

    

    

    
</dl>




















        
            

    

    
    <h4 class="name" id="onThumbStop"><span class="type-signature"></span>onThumbStop<span class="signature">()</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    Is called when the thumb should stop moving (for both the mouse AND touch)
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="core-slider_CoreSliderElement.js.html">core-slider/CoreSliderElement.js</a>, <a href="core-slider_CoreSliderElement.js.html#line336">line 336</a>
    </li></ul></dd>
    

    

    

    
</dl>




















        
            

    

    
    <h4 class="name" id="onTouchEnd"><span class="type-signature"></span>onTouchEnd<span class="signature">(e)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    Is called when the touch is released anywhere.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>e</code></td>
            

            <td class="type">
            
                
<span class="param-type">Event</span>


            
            </td>

            

            

            <td class="description last">the input event</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="core-slider_CoreSliderElement.js.html">core-slider/CoreSliderElement.js</a>, <a href="core-slider_CoreSliderElement.js.html#line276">line 276</a>
    </li></ul></dd>
    

    

    

    
</dl>




















        
            

    

    
    <h4 class="name" id="onTouchMove"><span class="type-signature"></span>onTouchMove<span class="signature">(e)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    Is called when the touch moves. This is only registered when onTouchStart is called.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>e</code></td>
            

            <td class="type">
            
                
<span class="param-type">Event</span>


            
            </td>

            

            

            <td class="description last">the input event</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="core-slider_CoreSliderElement.js.html">core-slider/CoreSliderElement.js</a>, <a href="core-slider_CoreSliderElement.js.html#line264">line 264</a>
    </li></ul></dd>
    

    

    

    
</dl>




















        
            

    

    
    <h4 class="name" id="onTouchStart"><span class="type-signature"></span>onTouchStart<span class="signature">(e)</span><span class="type-signature"></span></h4>
    

    



<div class="description">
    Is called when a touch is on the thumb.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>e</code></td>
            

            <td class="type">
            
                
<span class="param-type">Event</span>


            
            </td>

            

            

            <td class="description last">the input event</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="core-slider_CoreSliderElement.js.html">core-slider/CoreSliderElement.js</a>, <a href="core-slider_CoreSliderElement.js.html#line249">line 249</a>
    </li></ul></dd>
    

    

    

    
</dl>




















        
    

    

    
</article>

</section>




</div>

<nav>
    <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-CoreElement.html">CoreElement</a></li></ul><h3>Classes</h3><ul><li><a href="CoreByeElement.html">CoreByeElement</a></li><li><a href="CoreGreetElement.html">CoreGreetElement</a></li><li><a href="CoreHelloElement.html">CoreHelloElement</a></li><li><a href="CoreLinkElement.html">CoreLinkElement</a></li><li><a href="CoreSliderElement.html">CoreSliderElement</a></li><li><a href="CoreTooltipElement.html">CoreTooltipElement</a></li><li><a href="module-CoreElement-CoreElement.html">CoreElement</a></li></ul>
</nav>

<br class="clear">

<footer>
    Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.2</a> on Thu Jun 13 2019 18:17:43 GMT-0700 (Pacific Daylight Time)
</footer>

<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>