Added step value to Rotate Action.

This commit is contained in:
Richard Davey 2017-03-29 01:03:24 +01:00
parent b464aa5c8f
commit 5c0f550072
3 changed files with 8 additions and 6 deletions

View file

@ -1,8 +1,10 @@
var Rotate = function (items, value)
var Rotate = function (items, value, step)
{
if (step === undefined) { step = 0; }
for (var i = 0; i < items.length; i++)
{
items[i].rotation += value;
items[i].rotation += value + (i * step);
}
return items;

View file

@ -1,4 +1,4 @@
var CHECKSUM = {
build: '5d709120-1410-11e7-94c7-b1edf9b04222'
build: '262e7d70-1411-11e7-8d7e-9ffab0018bd6'
};
module.exports = CHECKSUM;

View file

@ -152,7 +152,7 @@ var Layer = new Class({
Actions.SetRotation(entries, rotation, stepRotation);
var scaleX = GetObjectValue(options, 'setScale.x', 1);
var scaleY = GetObjectValue(options, 'setScale.y', 1);
var scaleY = GetObjectValue(options, 'setScale.y', scaleX);
var stepScaleX = GetObjectValue(options, 'setScale.stepX', 0);
var stepScaleY = GetObjectValue(options, 'setScale.stepY', 0);
@ -267,9 +267,9 @@ var Layer = new Class({
return this;
},
rotate: function (value)
rotate: function (value, step)
{
Actions.Rotate(this.children.entries, value);
Actions.Rotate(this.children.entries, value, step);
return this;
},