Answered
Can I sort objects in a group without ungrouping them?
For example, I’ve selected a combination of an image and a text box.
I want to move the text box to the end of the selection without ungrouping the objects.
Below is the code that works when objects are not grouped.
Is there a way to perform operations on objects within a group?
// Sort the text box Move the text box to the end
sel.sort(function (a, b) {
var a;
var b;
if (“TextFrame” == a.constructor.name) {
return 1;
} else if (“TextFrame” == b.constructor.name) {
return -1;
}
});


