-
Notifications
You must be signed in to change notification settings - Fork 0
TransformationController.js
-
add(elements) ⇒
void
-
Adds an array of elements to the system. Calling this method from outside this class only makes sense in few cases, because changes to the element are not observed if itn't child of the baseElement.
-
getTransformableElement(domElement) ⇒
TransformableElement
|void
-
finds the TransformableElement that belongs to a certain domElement
-
addTransformableElement(domElement) ⇒
void
-
Similar to add(), but for a single DOM element and without query filters. Again, calling this method from outside this class only makes sense in few cases, because changes to the element are not observed if itn't child of the baseElement.
-
mousemoveEventTransform([transformationFunction], [additionalFilter], [postFunction]) ⇒
void
-
Adds an mousemove eventListener for each DOM element that matches the criteria. Defines how the function should be transformed in case of a mousemove and what should happen afterwards
Adds an array of elements to the system. Calling this method from outside this class only makes sense in few cases, because changes to the element are not observed if itn't child of the baseElement.
Kind: global function
Param | Type | Description |
---|---|---|
elements | Array.<object> |
Array of DOM elements. Only elements that pass the queryFilter are added. |
finds the TransformableElement that belongs to a certain domElement
Kind: global function
Returns: TransformableElement
| void
- TransformableElement that
belongs to a certain
domElement if there is one
Param | Type | Description |
---|---|---|
domElement | object |
DOM element which's TransformableElement is sought |
Similar to add(), but for a single DOM element and without query filters. Again, calling this method from outside this class only makes sense in few cases, because changes to the element are not observed if itn't child of the baseElement.
Kind: global function
Param | Type | Description |
---|---|---|
domElement | object |
Element which's TransformableElement is about to be added to the array |
Adds an mousemove eventListener for each DOM element that matches the criteria. Defines how the function should be transformed in case of a mousemove and what should happen afterwards
Kind: global function
Param | Type | Default | Description |
---|---|---|---|
[transformationFunction] | function |
(o, m)=>'none' |
returns a css transformation string. params: absolute transformation origin and mouse position, both in arrays. See {TransformationFunctions} for examples and predefined functions |
[additionalFilter] | string |
"'*'" |
css query that has to apply additionaly to the one passed in the constructor |
[postFunction] | function |
(event, element)=>{} |
optional function that runs after the transformation is sucessfully handeled internally. See {PostTransformFunctions} for examples and predefined functions. |
Attention: don't edit these files directly! They are auto-generated and pushed by Travis CI. Add your changes in the jsdoc comments in the code files.