1
0
Fork 0

Add FieldStyler docblocks

* src/ui/styler/FieldStyler.js (getId, applyStyle, revokeStyle,
addClass, removeClass): Docblocks added
master
Mike Gerwitz 2016-04-01 16:00:30 -04:00
parent a3b16f33c9
commit d126f618ae
1 changed files with 48 additions and 1 deletions

View File

@ -23,17 +23,53 @@ var AbstractClass = require( 'easejs' ).AbstractClass;
/**
* Style fields using CSS
* Style DOM fields
*
* @todo perhaps this should be called DomFieldStyler
*/
module.exports = AbstractClass( 'FieldStyler',
{
/**
* Retrieve unique identifier
*
* @return {string} unique identifier
*/
'abstract public getId': [],
/**
* Apply style to field
*
* @param {DomField} field field to style
* @param {HTMLElement} element DOM element to style
* @param {Array.<HTMLElement>} row DOM elements of containing row
*
* @return {FieldStyler} self
*/
'abstract public applyStyle': [ 'field', 'element', 'row' ],
/**
* Remove style from field
*
* @param {DomField} field field to unstyle
* @param {HTMLElement} element DOM element to unstyle
* @param {Array.<HTMLElement>} row DOM elements of containing row
*
* @return {FieldStyler} self
*/
'abstract public revokeStyle': [ 'field', 'element', 'row' ],
/**
* Add CSS class CLS to element ELEMENT
*
* This method is needed until support is dropped for browsers that do
* not support classList.
*
* @param {HTMLElement} element DOM element to style
* @param {string} cls class name
*
* @return {FieldStyler} self
*/
'protected addClass': function( element, cls )
{
if ( !element )
@ -60,6 +96,17 @@ module.exports = AbstractClass( 'FieldStyler',
},
/**
* Add CSS class CLS to element ELEMENT
*
* This method is needed until support is dropped for browsers that do
* not support classList.
*
* @param {HTMLElement} element DOM element to style
* @param {string} cls class name
*
* @return {FieldStyler} self
*/
'protected removeClass': function( element, cls )
{
if ( !element )