Propery NS of type String
SVG namespace
Propery logBadgeCss of type String
CSS styles for console.log/warn/error ::mojs:: badge styling
Propery shortColors of type Object
Shortcut map for the 16 standart web colors used to coerce literal name to rgb
none-tweenable props
Method cloneObj
Clones object by iterating thru object properties
Parameters:
to
must be an Object.with
must be an Object.Returns an Object
(new object)
Example:
h.cloneObj({ foo: 'bar', baz: 'bar' }, { baz: 1 })
// result: { foo: 'bar' }
Method extend
Copies keys and values from the second object to the first if key was not defined on the first object
Parameters:
to
must be an Object.from
must be an Object.Returns an Object
(the first modified object)
Example:
var objA = { foo: 'bar' }, objB = { baz: 'bax' };
h.extend(objA, objB)
// result: objA{ foo: 'bar', baz: 'bax' }
Math.min Math.max(value, min), max
Method style
Sets styles on element with prefix(if needed) on el
Parameters:
element
must be a DOMNode.style
must be a String, Object.style
must be a String.Example:
h.style(el, 'width', '20px')
Example:
h.style(el, { width: '20px', height: '10px' })
if a plain number was passed set isStrict to false and add px
plain number
string array
if !arr1? or !arr2? then throw Error 'Two arrays should be passed' if !@isArray(arr1)or!@isArray(arr2) then throw Error 'Two arrays expected'
if !arr1? or !arr2? then throw Error 'Two arrays should be passed'
HEX
not HEX shorthand color and rgb()
rgb color
shorthand color name
split the value in case it contains base the regex splits 0,0 0,1 1,0 1,1 combos if num taken as 1, rand() taken as 0
if contains the base value
if just a plain value
parse with units
add units only if option had a unit before
Method to parse stagger or return the passed value if it has no stagger expression in it.
if passed string has rand function then get the rand value
if delta object was passed: like { 20: 75 }
color values
color strokeDasharray/strokeDashoffset
defined in helpers.chainOptionMap because tween-related props shouldn't
position values defined in posPropsMap
none position but numeric values
if typeof Node is 'function' then o instanceof Node else
Method getUniqID
Returns uniq id
Returns a Number
Method parsePath
Returns an uniq id
Returns a SVGPath
Method parsePath
Returns uniq id
Returns a SVGPath
Method to check if 3d transform are supported
class Helpers
Utils methods and map objects