Commit 569cbdd4 authored by Chen Jiping's avatar Chen Jiping

fix:调整提示显示

parent 0eaa6ef6
......@@ -55,6 +55,9 @@ export class PlayComponent implements OnInit, OnDestroy {
audioObj = {};
renderArr;
magnifierArr = [];
mapScale = 1;
canvasLeft;
......@@ -375,7 +378,7 @@ export class PlayComponent implements OnInit, OnDestroy {
}
checkClickHotZoneTarget(target){
checkClickHotZoneTarget(target) {
const rect = target.getBoundingBox();
rect.width += 60 * this.mapScale;
......@@ -584,6 +587,8 @@ export class PlayComponent implements OnInit, OnDestroy {
this.renderArr = [];
this.magnifierArr = [];
this.isMagnifierTouched = false;
this.photoAnima = null;
this.textLabelArr = [];
......@@ -812,7 +817,7 @@ export class PlayComponent implements OnInit, OnDestroy {
magnifier.setScaleXY(this.mapScale);
magnifier.x = this.canvasWidth / 2;
magnifier.y = this.canvasHeight / 2;
this.renderArr.push(magnifier);
this.magnifierArr.push(magnifier);
console.log('rate: ', this.hotZoneRate);
......@@ -862,6 +867,21 @@ export class PlayComponent implements OnInit, OnDestroy {
this.curHotZoneItem = hotZoneItem;
if (this.curHotZoneItem.alpha === 0) {
this.magnifier['light'].visible = true;
setTimeout(() => {
this.magnifier['light'].visible = false;
setTimeout(() => {
this.magnifier['light'].visible = true;
}, 100);
}, 100);
}
} else {
if (this.curHotZoneItem) {
this.curHotZoneItem.alpha = 0;
......@@ -1009,17 +1029,9 @@ export class PlayComponent implements OnInit, OnDestroy {
if (this.curHotZoneItem.alpha === 0) {
this.magnifier['light'].visible = true;
setTimeout(() => {
this.magnifier['light'].visible = false;
setTimeout(() => {
this.magnifier['light'].visible = true;
this.magnifier.x = this.curHotZoneItem.x;
this.magnifier.y = this.curHotZoneItem.y + 50 * this.mapScale;
this.showPhotoAnima();
}, 100);
}, 100);
}
}
......@@ -1058,6 +1070,8 @@ export class PlayComponent implements OnInit, OnDestroy {
this.updateArr(this.renderArr);
this.updateArr(this.magnifierArr);
this.updateArr(this.textLabelArr);
this.updateArr(this.endRenderArr);
......
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