import { NgxMoveableComponent } from "ngx-moveable"; import { ViewChild, ElementRef, Component } from "@angular/core"; @Component({ selector: "ngx-app", templateUrl: "./App.component.html" }) export default class NgxAppComponent { maxWidth: any = "$preview_maxWidth"; maxHeight: any = "$preview_maxHeight"; minWidth: any = "$preview_minWidth"; minHeight: any = "$preview_minHeight"; resizable: any = "$preview_resizable"; keepRatio: any = "$preview_keepRatio"; throttleResize: any = "$preview_throttleResize"; renderDirections: any = "$preview_renderDirections"; @ViewChild("targetRef") targetRef!: ElementRef; onResize(e) { e.target.style.width = `${e.width}px`; e.target.style.height = `${e.height}px`; e.target.style.transform = e.drag.transform; } }