Possible bug--"alignToCanvas": true only works if it's enabled in the options bar

I’m trying to align some elements in a document with document boundaries using the Move tool.

batchPlay from Alchimist:

{"_obj": "align","_target": [{"_ref": "layer","_enum": "ordinal","_value": "targetEnum"}],"using": {"_enum": "alignDistributeSelector","_value": "ADSCentersV"},"alignToCanvas": true}


“alignToCanvas”: true
only works if “Align to:” is set to “Canvas” in the options bar for the Move tool. It doesn’t programmatically override if “Align to:” is set to “Selection” in the options bar, which appears to be the default.

I’d expect

“alignToCanvas”: true
to take precedence over whatever is specified in the options bar.

1 Like

Yep, funny enough I had the same issue a couple of days ago. I couldn’t find a way to force this option to true.
My workaround is to call a “select all” and then call the “align”. So far it works.

Yes, that was my workaround also.

But I’m unsure of whether to set “alignToCanvas” to true or false. I’m leaning towards leaving it set to “true” as that is the desired behavior, it seems, if this is fixed.

I think there is one more case like that and I think it was somehow related to linked layers.