Skip to content

Commit

Permalink
Fix translate3d util function after transform refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
dfreedm committed May 1, 2015
1 parent 82f0a57 commit 85bcb13
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions src/standard/utils.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
*
* @method toggleClass
* @param {String} name CSS class name
* @param {boolean} bool Optional boolean to force the class on or off.
* @param {boolean=} bool Boolean to force the class on or off.
* When unspecified, the state of the class will be reversed.
* @param {HTMLElement} node Optional node to target. Defaults to `this`.
* @param {HTMLElement=} node Node to target. Defaults to `this`.
*/
toggleClass: function(name, bool, node) {
node = node || this;
Expand All @@ -45,9 +45,9 @@
*
* @method toggleAttribute
* @param {String} name HTML attribute name
* @param {boolean} bool Optional boolean to force the attribute on or off.
* @param {boolean=} bool Boolean to force the attribute on or off.
* When unspecified, the state of the attribute will be reversed.
* @param {HTMLElement} node Optional node to target. Defaults to `this`.
* @param {HTMLElement=} node Node to target. Defaults to `this`.
*/
toggleAttribute: function(name, bool, node) {
node = node || this;
Expand Down Expand Up @@ -102,7 +102,7 @@
* an optional selector may be passed to choose the desired content.
*
* @method getContentChildNodes
* @param {String} slctr Optional CSS selector to choose the desired
* @param {String=} slctr CSS selector to choose the desired
* `<content>`. Defaults to `content`.
* @return {Array<Node>} List of distributed nodes for the `<content>`.
*/
Expand All @@ -121,7 +121,7 @@
* elements are returned.
*
* @method getContentChildNodes
* @param {String} slctr Optional CSS selector to choose the desired
* @param {String=} slctr CSS selector to choose the desired
* `<content>`. Defaults to `content`.
* @return {Array<HTMLElement>} List of distributed nodes for the
* `<content>`.
Expand All @@ -137,9 +137,9 @@
*
* @method fire
* @param {String} type Name of event type.
* @param {Object} detail Optional detail object containing event-specific
* @param {Object=} detail Detail object containing event-specific
* payload.
* @param {Object} options Optional object specifying options. These
* @param {Object=} options Object specifying options. These
* may include `bubbles` (boolean), `cancelable` (boolean), and `node`
* on which to fire the event (HTMLElement, defaults to `this`).
* @return {CustomEvent} The new event that was fired.
Expand All @@ -166,7 +166,7 @@
*
* @method async
* @param {Function} callback The callback function to run, bound to `this`.
* @param {number} waitTime Optional time to wait before calling the
* @param {number=} waitTime Time to wait before calling the
* `callback`. If unspecified or 0, the callback will be run at microtask
* timing (before paint).
* @return {number} Handle that may be used to cancel the async job.
Expand Down Expand Up @@ -205,8 +205,9 @@
* Cross-platform helper for setting an element's CSS `transform` property.
*
* @method transform
* @param {HTMLElement} node Element to apply the transform to.
* @param {String} transform Transform setting.
* @param {HTMLElement=} node Element to apply the transform to.
* Defaults to `this`
*/
transform: function(transform, node) {
node = node || this;
Expand All @@ -219,14 +220,15 @@
* property.
*
* @method translate3d
* @param {HTMLElement} node Element to apply the transform to.
* @param {number} x X offset.
* @param {number} y Y offset.
* @param {number} z Z offset.
* @param {HTMLElement=} node Element to apply the transform to.
* Defaults to `this`.
*/
translate3d: function(x, y, z, node) {
node = node || this;
this.transform(node, 'translate3d(' + x + ',' + y + ',' + z + ')');
this.transform('translate3d(' + x + ',' + y + ',' + z + ')', node);
},

importHref: function(href, onload, onerror) {
Expand Down

0 comments on commit 85bcb13

Please sign in to comment.