Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix translate3d call after transform refactor #1478

Merged
merged 1 commit into from
May 2, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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