Commit b9f23887 authored by 范雪寒's avatar 范雪寒

test: log

parent 3cede1d0
...@@ -100,6 +100,8 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy, OnChanges { ...@@ -100,6 +100,8 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy, OnChanges {
@Input() @Input()
set bgItem(v) { set bgItem(v) {
this._bgItem = v; this._bgItem = v;
console.log('set bgItem')
this.init();
} }
_bgItem2 = null; _bgItem2 = null;
...@@ -109,6 +111,8 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy, OnChanges { ...@@ -109,6 +111,8 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy, OnChanges {
@Input() @Input()
set bgItem2(v) { set bgItem2(v) {
this._bgItem2 = v; this._bgItem2 = v;
console.log('set bgItem2')
this.init();
} }
onResize(event) { onResize(event) {
...@@ -120,6 +124,7 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy, OnChanges { ...@@ -120,6 +124,7 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy, OnChanges {
this.initListener(); this.initListener();
console.log('ngOnInit')
this.init(); this.init();
this.update(); this.update();
...@@ -138,12 +143,14 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy, OnChanges { ...@@ -138,12 +143,14 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy, OnChanges {
onBackgroundUploadSuccess(e) { onBackgroundUploadSuccess(e) {
console.log('e: ', e); console.log('e: ', e);
this.bgItem.url = e.url; this.bgItem.url = e.url;
console.log('onBackgroundUploadSuccess')
this.refreshBackground(); this.refreshBackground();
} }
onBackground_2_UploadSuccess(e) { onBackground_2_UploadSuccess(e) {
console.log('e: ', e); console.log('e: ', e);
this.bgItem2.url = e.url; this.bgItem2.url = e.url;
console.log('onBackground_2_UploadSuccess')
this.refreshBackground(); this.refreshBackground();
} }
...@@ -449,6 +456,7 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy, OnChanges { ...@@ -449,6 +456,7 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy, OnChanges {
if (!this.bgItem2) { if (!this.bgItem2) {
this.bgItem2 = {}; this.bgItem2 = {};
} }
console.log('initItem ');
this.refreshBackground(() => { this.refreshBackground(() => {
if (!this.hotZoneItemArr) { if (!this.hotZoneItemArr) {
this.hotZoneItemArr = []; this.hotZoneItemArr = [];
...@@ -562,6 +570,7 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy, OnChanges { ...@@ -562,6 +570,7 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy, OnChanges {
this.mapScale = this.canvasWidth / this.canvasBaseW; this.mapScale = this.canvasWidth / this.canvasBaseW;
this.renderArr = []; this.renderArr = [];
this.bg = null; this.bg = null;
this.bg2 = null;
this.imgArr = []; this.imgArr = [];
this.hotZoneArr = []; this.hotZoneArr = [];
...@@ -791,6 +800,7 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy, OnChanges { ...@@ -791,6 +800,7 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy, OnChanges {
renderAfterResize() { renderAfterResize() {
this.canvasWidth = this.wrap.nativeElement.clientWidth; this.canvasWidth = this.wrap.nativeElement.clientWidth;
this.canvasHeight = this.wrap.nativeElement.clientHeight; this.canvasHeight = this.wrap.nativeElement.clientHeight;
console.log('renderAfterResize')
this.init(); this.init();
} }
......
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