documentation

Documentation generator: JsDoc Toolkit 2.4.0
Template: Wink 1.0
Generated on:

Namespace wink

Namespace Summary
Constructor Attributes Constructor Name and Description
 

Method Summary

Namespace Detail

wink

Field Detail

<static> {string} wink.version
The version of Wink currently in use
Defined in: base.js.

Method Detail

  • <static> wink.addClass()

    Defined in: 2dfx.js.
    See:
    wink.fx.addClass
  • <static> {function} wink.bind(method, context, arguments)
    Binds a method to a given context
    Defined in: base.js.
    Parameters:
    {string} method
    The method to bind
    {object} context
    The scope with which the method will be executed
    {object} arguments Optional
    Arguments to pass to the binded function
    Returns:
    {function} The binded function
  • <static> {HTMLElement} wink.byId(id)
    Returns a DOM element
    Defined in: base.js.
    var test = wink.byId('myComponent');
    Parameters:
    {string} id
    The identifier of the DOM element to return
    Returns:
    {HTMLElement} Returns the DOM ellement if it has been found or the id otherwise
  • <static> {function} wink.call(callback, parameters)
    Invokes the given callback
    Defined in: base.js.
    var ctx = {
      fn: function(params, message) {
        console.log("fn: ", params.property, message);
      }
    };
    var fn2 = function(message, params) {
      console.log("fn2: ", params.property, message);
    };
    wink.call({ context: ctx, method: 'fn', arguments: "message" }, { property: "value" });
    wink.call(wink.bind(fn2, this, "message"), { property: "value" });
    Parameters:
    {object|function} callback
    The callback to invoke
    {object} parameters Optional
    Parameters to pass to the callback
    Returns:
    {function} The called function
  • <static> wink.connect(source, method, callback)
    Connect a method to another method
    Defined in: base.js.
    Parameters:
    {object} source
    The source context
    {string} method
    The source method
    {object|function} callback
    A callback that will be called once the source method will be invoked
  • <static> wink.disconnect(source, method, callback)
    Disconnect two methods
    Defined in: base.js.
    Parameters:
    {object} source
    The source context that was previously connected
    {string} method
    The source method that was previously connected
    {object|function} callback
    The callback that was previously connected
  • <static> {integer} wink.getLeftPosition(node, parentNode, transform)
    Retrieve the top position of a node (left and transform if specified)
    Defined in: base.js.
    Parameters:
    {HTMLElement} node
    The node
    {HTMLElement} parentNode Optional
    If specified, the returned value is relative to the parentNode node. If parentNode is not a parent node of the current HTML element or if not specified, the returned value will be an absolute left position
    {boolean} transform Optional
    Take CSS transforms into account while calculating the position
    Returns:
    {integer} The x position of the element
  • <static> {object} wink.getPosition(node, parentNode, transform)
    Retrieve the position of a node (top, left and transform if specified)
    Defined in: base.js.
    Parameters:
    {HTMLElement} node
    The node
    {HTMLElement} parentNode Optional
    If specified, the returned value is relative to the parentNode node. If parentNode is not a parent node of the current HTML element or if not specified, the returned value will be an absolute position
    {boolean} transform Optional
    Take CSS transforms into account while calculating the position
    Returns:
    {object} the x and y position of the element
  • <static> {integer} wink.getTopPosition(node, parentNode, transform)
    Retrieve the top position of a node (top and transform if specified)
    Defined in: base.js.
    Parameters:
    {HTMLElement} node
    The node
    {HTMLElement} parentNode Optional
    If specified, the returned value is relative to the parentNode node. If parentNode is not a parent node of the current HTML element or if not specified, the returned value will be an absolute top position
    {boolean} transform Optional
    Take CSS transforms into account while calculating the position
    Returns:
    {integer} the y position of the element
  • <static> {integer} wink.getUId()
    Generates a unique identifier
    Defined in: base.js.
    Returns:
    {integer} The unique id
  • <static> wink.hasClass()

    Defined in: 2dfx.js.
    See:
    wink.fx.hasClass
  • <static> {boolean} wink.isArray(object)
    Returns true if the given parameter is an array
    Defined in: base.js.
    Parameters:
    {object} object
    The object to test
    Returns:
    {boolean} True if the object is an array false otherwise
  • <static> {boolean} wink.isBoolean(object)
    Returns true if the given parameter is a boolean
    Defined in: base.js.
    Parameters:
    {object} object
    The object to test
    Returns:
    {boolean} True if the object is a boolean false otherwise
  • <static> {boolean} wink.isCallback(callback)
    Returns true if the given callback object is valid (contains at least a method. It can also contain a context) A callback can be also a function.
    Defined in: base.js.
    Parameters:
    {object|function} callback
    The object to test
    Returns:
    {boolean} True if the object is a valid callback false otherwise
  • <static> {boolean} wink.isFunction(object)
    Returns true if the given parameter is a function
    Defined in: base.js.
    Parameters:
    {object} object
    The object to test
    Returns:
    {boolean} True if the object is a function false otherwise
  • <static> {boolean} wink.isInteger(object)
    Returns true if the given parameter is an integer
    Defined in: base.js.
    Parameters:
    {object} object
    The object to test
    Returns:
    {boolean} True if the object is an integer false otherwise
  • <static> {boolean} wink.isNull(object)
    Returns true if the given parameter is null, false otherwise.
    Defined in: base.js.
    Parameters:
    {object} object
    The object to test
    Returns:
    {boolean} True if the object is null false otherwise
  • <static> {boolean} wink.isNumber(object)
    Returns true if the given parameter is a number
    Defined in: base.js.
    Parameters:
    {object} object
    The object to test
    Returns:
    {boolean} True if the object is a number false otherwise
  • <static> {boolean} wink.isSet(object)
    Returns true if the given parameter is set, false otherwise.
    Defined in: base.js.
    Parameters:
    {object} object
    The object to test
    Returns:
    {boolean} True if the object is set false otherwise
  • <static> {boolean} wink.isString(object)
    Returns true if the given parameter is a string, false otherwise.
    Defined in: base.js.
    Parameters:
    {object} object
    The object to test
    Returns:
    {boolean} True if the object is a string false otherwise
  • <static> {boolean} wink.isUndefined(object)
    Returns true if the given parameter is undefined, false otherwise.
    Defined in: base.js.
    Parameters:
    {object} object
    The object to test
    Returns:
    {boolean} True if the object is undefined false otherwise
  • <static> wink.load()

    Defined in: wink.cache.js.
    See:
    wink.cache.load
  • <static> wink.log()

    Defined in: error.js.
    See:
    wink.error.log
  • <static> wink.mixin()

    Defined in: json.js.
    See:
    wink.json.concat
  • <static> wink.parseJSON()

    Defined in: json.js.
    See:
    wink.json.parse
  • <static> wink.publish()

    Defined in: topics.js.
    See:
    wink.topics.publish
  • <static> {object} wink.query(selector, element)
    Execute a query and returns the corresponding DOM elements
    Defined in: base.js.
    var test = wink.query('.MyClass');
    var test2 = $$('input[type=radio]');
    
    $$(".MyClass").removeClass("hidden").addClass("active");
    $$(".MyClass").translate(20, 20).rotate(2);
    var positions = $$(".MyClass").getPosition();
    
    if ($$("#box").hasClass("visible")) {
      $$("#box").applyTransition("background-color", "1s", "1ms", "linear").apply({ "background-color": "blue" });
      $$("#box").listenTo("rotation", function(gestureInfos) {
        console.log("rotation [" + gestureInfos.rotation + "deg]");
      });
    }
    Parameters:
    {string} selector
    The query selector you want to use
    {HTMLElement} element Optional
    The element where you want to search
    Returns:
    {object} Returns a wrapper containing an array of the DOM elements corresponding to the query
  • <static> wink.removeClass()

    Defined in: 2dfx.js.
    See:
    wink.fx.removeClass
  • <static> {object} wink.setInterval(context, method, delay, arguments)
    Calls a method periodically at the provided frequency
    Defined in: base.js.
    Parameters:
    {object} context
    The execution context of the method to call
    {string} method
    The method to call
    {integer} delay
    Time (in milliseconds) to wait before calling method again
    {object} arguments Optional
    A list of caller arguments
    Returns:
    {object} The interval object
  • <static> wink.setLocale(locale)
    Set wink locale used for translation
    Defined in: base.js.
    Parameters:
    {string} locale
    The lang you want to set
  • <static> {object} wink.setTimeout(context, method, delay, arguments)
    Calls a deferred method.
    Defined in: base.js.
    Parameters:
    {object} context
    The execution context of the method to call
    {string} method
    The method to call
    {integer} delay
    Time (in milliseconds) to wait before calling method
    {object} arguments Optional
    A list of caller arguments
    Returns:
    {object} The timeout object
  • <static> wink.subscribe()

    Defined in: topics.js.
    See:
    wink.topics.subscribe
  • <static> {string} wink.translate(key, object)
    Returns the translated value of a key
    Defined in: base.js.
    var test = wink.translate('myText')
    var test2 = _('myText');
    Parameters:
    {String} key
    The key identifying a ressource
    {Object} object Optional
    The component that holds the resource list (within an i18n object)
    Returns:
    {string} The translated value of the key
  • <static> {string} wink.trim(str)
    Returns the given string parameter trimed.
    Defined in: base.js.
    Parameters:
    {string} str
    The string to trim
    Returns:
    {string} The trimmed string
  • <static> wink.unsubscribe()

    Defined in: topics.js.
    See:
    wink.topics.unsubscribe