Skip to content

TransformationController.js

Travis CI User edited this page Sep 24, 2018 · 4 revisions

Functions

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

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.

Kind: global function

Param Type Description
elements Array.<object> Array of DOM elements. Only elements that pass the queryFilter are added.

getTransformableElement(domElement) ⇒ TransformableElement | void

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

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.

Kind: global function

Param Type Description
domElement object Element which's TransformableElement is about to be added to the array

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

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.
Clone this wiki locally