Commit 3cede1d0 authored by 范雪寒's avatar 范雪寒

test: log

parent 6ffeaf37
......@@ -158,6 +158,7 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy, OnChanges {
refreshBackground(callBack = null) {
console.log('refreshBackground');
let bg1Loaded = false;
let bg2Loaded = false;
this.loadBg1(() => {
......@@ -179,6 +180,7 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy, OnChanges {
}
loadBg1(callBack) {
console.log('loadBg1');
if (!this.bg) {
this.bg = new MySprite(this.ctx);
this.renderArr.push(this.bg);
......@@ -189,6 +191,7 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy, OnChanges {
return;
}
console.log('this.bgItem.url = ' + this.bgItem.url);
this.bg.load(this.bgItem.url).then(() => {
const rate1 = this.canvasWidth / this.bg.width;
const rate2 = this.canvasHeight / this.bg.height;
......@@ -204,6 +207,7 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy, OnChanges {
}
loadBg2(callBack) {
console.log('loadBg2');
if (!this.bg2) {
this.bg2 = new MySprite(this.ctx);
this.renderArr.push(this.bg2);
......@@ -214,6 +218,7 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy, OnChanges {
return;
}
console.log('this.bgItem2.url = ' + this.bgItem2.url);
this.bg2.load(this.bgItem2.url).then(() => {
const rate1 = this.canvasWidth / this.bg2.width;
const rate2 = this.canvasHeight / this.bg2.height;
......
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