import { NgxMoveableComponent } from "ngx-moveable"; import { ViewChild, ElementRef, Component } from "@angular/core"; @Component({ selector: "ngx-app", templateUrl: "./App.component.html" }) export default class NgxAppComponent { 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"; snappable: any = "$preview_snappable"; snapGridWidth: any = "$preview_snapGridWidth"; snapGridHeight: any = "$preview_snapGridHeight"; isDisplayGridGuidelines: any = "$preview_isDisplayGridGuidelines"; @ViewChild("targetRef") targetRef!: ElementRef; @ViewChild("moveableRef") moveableRef!: NgxMoveableComponent; onDrag(e) { e.target.style.transform = e.transform; } onScale(e) { e.target.style.transform = e.drag.transform; } }