Help with expression to move y position depending on condition
Hello,
I am struggling to get this expression to work. I thought someone might be able to help me. I want a text layer to move y position depending on an if-else statement. If the text field is one or two line heights or not move to y1 or y2 position... Right now, this code works, but instead of moving the y it displays the y position with the text value. (example: some text1820) I am not sure what I am doing wrong. Thanks!
var l = thisLayer
var tx = l.text.sourceText.value;
var h = tx.split('\r');
var n = h.length; var y1 = transform.yPosition = [1920];
var y1 = transform.yPosition = [1920];
var y2 = transform.yPosition = [1820];
if (n > 1) {
[value + y2 ];
} else {
[ value + y1 ];
}
