diff --git a/index.js b/index.js index e0cf183..24ac152 100644 --- a/index.js +++ b/index.js @@ -250,6 +250,26 @@ Move.prototype.rotate = function(n){ return this.transform('rotate(' + n + 'deg)'); }; +/** + * + * @param {Number} n + * @returns {Move} for chaining + * @api public + */ +Move.prototype.rotateX = function(n){ + return this.transform('rotateX(' + n + 'deg)'); +}; + +/** + * + * @param {Number} n + * @returns {Move} for chaining + * @api public + */ +Move.prototype.rotateY = function(n){ + return this.transform('rotateY(' + n + 'deg)'); +}; + /** * Set transition easing function to to `fn` string. * diff --git a/move.js b/move.js index e715755..4570c0b 100644 --- a/move.js +++ b/move.js @@ -56,11 +56,11 @@ require.helper.semVerSort = function(a, b) { /** * Find and require a module which name starts with the provided name. - * If multiple modules exists, the highest semver is used. + * If multiple modules exists, the highest semver is used. * This function can only be used for remote dependencies. * @param {String} name - module name: `user~repo` - * @param {Boolean} returnPath - returns the canonical require path if true, + * @param {Boolean} returnPath - returns the canonical require path if true, * otherwise it returns the epxorted module */ require.latest = function (name, returnPath) { @@ -83,7 +83,7 @@ require.latest = function (name, returnPath) { semVerCandidates.push({version: version, name: moduleName}); } else { otherCandidates.push({version: version, name: moduleName}); - } + } } } if (semVerCandidates.concat(otherCandidates).length === 0) { @@ -327,7 +327,7 @@ CssEmitter.prototype.bind = function(fn){ /** * Unbind CSS events - * + * * @api public */ @@ -340,7 +340,7 @@ CssEmitter.prototype.unbind = function(fn){ /** * Fire callback only once - * + * * @api public */ @@ -960,6 +960,26 @@ Move.prototype.rotate = function(n){ return this.transform('rotate(' + n + 'deg)'); }; +/** + * + * @param {Number} n + * @returns {Move} for chaining + * @api public + */ + Move.prototype.rotateX = function(n){ + return this.transform('rotateX(' + n + 'deg)'); +}; + +/** + * + * @param {Number} n + * @returns {Move} for chaining + * @api public + */ +Move.prototype.rotateY = function(n){ + return this.transform('rotateY(' + n + 'deg)'); +}; + /** * Set transition easing function to to `fn` string. * @@ -1079,8 +1099,8 @@ Move.prototype.set = function(prop, val){ } } else { this.transition(prop); - this._props[prop] = val; - } + this._props[prop] = val; + } return this; };