Closed jxyun99 closed 1 year ago
Hi jxyun99.
The angle is recorded in Tag. It would be an easy way to get the value from there and then restore the angle.
For example:
var item = app.activeDocument.selection[0];
var tag = item.tags[0];
var value = tag.value;
// convert radian to degree
var deg = 180 / Math.PI * value;
resetToFullScale(item);
// restore the angle
item.rotate(deg);
https://github.com/jxyun99/test/blob/main/test.gif
I seem to have found a bug. If an object is rotated by an angle, such as -180°, the position after resizing will not be the original position
https://github.com/jxyun99/test/blob/main/test.gif is Presentation Diagram
I have confirmed the bug here as well. I'll fix it.
Fixed a bug.
Thank you. I just tested it is ok
resetToFullScale.js if I want to maintain the rotation angle of the object,What should I do?