The drag and scale here is a little more complex than the general selection box. You can set a fixed trigger point of eight orientations (directions), and set the minimum range, maximum range, and proportional scaling.
Similar to the drag-and-drop effect, the prototype of the program is also made during image cutting. However, there are few references for this effect, and I have made many detours by myself. Now I have made the desired effect, compared with the previous version, the program is also "beyond the control". I still feel that there are many things to be improved, just like there will never be the most perfect Turkish carpet.
There is also a simplified version of SimpleResize for easy learning.
Online Testing http://img.jb51.net/online/Resize/Resize.htm
Packaging http://img.jb51.net/online/Resize/Resize.rar
Ps: The instance contains the drag-and-drop effect. However, the two effects are completely independent, and the drag-and-drop part can be scaled normally.