Hey, I'm sorry for the following potentially idiotic question... If I have an object which stores a set of dimensions like x or y, and their values, like 50 or 100, how could I loop through the object applying the dimension variable to layers (and applying a calculation to set new values)?
This might be clearer with a bit of code.
for layer in ƒƒ()
x: layer.x, y: layer.y
for dimension, value of originalCoordinates
layer.dimension = value * scaleRatio
The last line doesn't work, and I don't have the experience to understand why. If I swap that last line for 'layer.x = value * scaleRatio' it works fine. If I console.log 'dimension' it correctly displays 'x' or 'y'. This leads me to believe that there's some kind of variable 'type'. But how to change from one type to another?