Trying to create drag, resize and rotate feature in Angular 17. When I am trying to resize the element, it is not working as expected

I am trying to create a drag, resize and rotate feature in angular using custom javascript functions. My resize is not working as expected. When I am trying to resize the element from corners or from center dots, position of other corners is not fixed. Also when element is rotated to a particular deg let’s assume 20 degree and then trying to resize, then position is not stable.

Demo Url:
https://stackblitz.com/edit/angular-empty-project-emm12p?file=app%2Fapp.component.ts