import { NgxMoveableComponent } from "ngx-moveable"; import { ViewChild, ElementRef, Component } from "@angular/core"; @Component({ selector: "ngx-app", templateUrl: "./App.component.html" }) export default class NgxAppComponent { originDraggable: any = "$preview_originDraggable"; originRelative: any = "$preview_originRelative"; draggable: any = "$preview_draggable"; throttleDrag: any = "$preview_throttleDrag"; edgeDraggable: any = "$preview_edgeDraggable"; startDragRotate: any = "$preview_startDragRotate"; throttleDragRotate: any = "$preview_throttleDragRotate"; scalable: any = "$preview_scalable"; keepRatio: any = "$preview_keepRatio"; throttleScale: any = "$preview_throttleScale"; renderDirections: any = "$preview_renderDirections"; rotatable: any = "$preview_rotatable"; throttleRotate: any = "$preview_throttleRotate"; rotationPosition: any = "$preview_rotationPosition"; @ViewChild("targetRef") targetRef!: ElementRef; onDragOrigin(e) { e.target.style.transformOrigin = e.transformOrigin; e.target.style.transform = e.drag.transform; } onDrag(e) { e.target.style.transform = e.transform; } onScale(e) { e.target.style.transform = e.drag.transform; } onRotate(e) { e.target.style.transform = e.drag.transform; } }