Commit 4d09c31d authored by limingzhe's avatar limingzhe

add upload-image-width-preview

parent 1f535d89
...@@ -44,7 +44,7 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy, OnChanges { ...@@ -44,7 +44,7 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy, OnChanges {
@ViewChild('canvas') canvas: ElementRef; @ViewChild('canvas') canvas: ElementRef;
@ViewChild('wrap') wrap: ElementRef; @ViewChild('wrap') wrap: ElementRef;
@HostListener('window:resize', ['$event']) // @HostListener('window:resize', ['$event'])
canvasWidth = 1280; canvasWidth = 1280;
canvasHeight = 720; canvasHeight = 720;
...@@ -68,7 +68,7 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy, OnChanges { ...@@ -68,7 +68,7 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy, OnChanges {
images = new Map(); images = new Map();
animationId: any; animationId: any;
winResizeEventStream = new Subject(); // winResizeEventStream = new Subject();
canvasLeft; canvasLeft;
canvasTop; canvasTop;
...@@ -95,7 +95,7 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy, OnChanges { ...@@ -95,7 +95,7 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy, OnChanges {
onResize(event) { onResize(event) {
this.winResizeEventStream.next(); // this.winResizeEventStream.next();
} }
...@@ -655,11 +655,11 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy, OnChanges { ...@@ -655,11 +655,11 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy, OnChanges {
initListener() { initListener() {
this.winResizeEventStream // this.winResizeEventStream
.pipe(debounceTime(500)) // .pipe(debounceTime(500))
.subscribe(data => { // .subscribe(data => {
this.renderAfterResize(); // this.renderAfterResize();
}); // });
if (this.IsPC()) { if (this.IsPC()) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment