Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
LST-04-01
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
template admin
LST-04-01
Commits
569cbdd4
Commit
569cbdd4
authored
Nov 24, 2020
by
Chen Jiping
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:调整提示显示
parent
0eaa6ef6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
14 deletions
+28
-14
play.component.ts
src/app/play/play.component.ts
+28
-14
No files found.
src/app/play/play.component.ts
View file @
569cbdd4
...
@@ -55,6 +55,9 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -55,6 +55,9 @@ export class PlayComponent implements OnInit, OnDestroy {
audioObj
=
{};
audioObj
=
{};
renderArr
;
renderArr
;
magnifierArr
=
[];
mapScale
=
1
;
mapScale
=
1
;
canvasLeft
;
canvasLeft
;
...
@@ -375,7 +378,7 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -375,7 +378,7 @@ export class PlayComponent implements OnInit, OnDestroy {
}
}
checkClickHotZoneTarget
(
target
){
checkClickHotZoneTarget
(
target
)
{
const
rect
=
target
.
getBoundingBox
();
const
rect
=
target
.
getBoundingBox
();
rect
.
width
+=
60
*
this
.
mapScale
;
rect
.
width
+=
60
*
this
.
mapScale
;
...
@@ -584,6 +587,8 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -584,6 +587,8 @@ export class PlayComponent implements OnInit, OnDestroy {
this
.
renderArr
=
[];
this
.
renderArr
=
[];
this
.
magnifierArr
=
[];
this
.
isMagnifierTouched
=
false
;
this
.
isMagnifierTouched
=
false
;
this
.
photoAnima
=
null
;
this
.
photoAnima
=
null
;
this
.
textLabelArr
=
[];
this
.
textLabelArr
=
[];
...
@@ -812,7 +817,7 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -812,7 +817,7 @@ export class PlayComponent implements OnInit, OnDestroy {
magnifier
.
setScaleXY
(
this
.
mapScale
);
magnifier
.
setScaleXY
(
this
.
mapScale
);
magnifier
.
x
=
this
.
canvasWidth
/
2
;
magnifier
.
x
=
this
.
canvasWidth
/
2
;
magnifier
.
y
=
this
.
canvasHeight
/
2
;
magnifier
.
y
=
this
.
canvasHeight
/
2
;
this
.
rend
erArr
.
push
(
magnifier
);
this
.
magnifi
erArr
.
push
(
magnifier
);
console
.
log
(
'
rate:
'
,
this
.
hotZoneRate
);
console
.
log
(
'
rate:
'
,
this
.
hotZoneRate
);
...
@@ -862,6 +867,21 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -862,6 +867,21 @@ export class PlayComponent implements OnInit, OnDestroy {
this
.
curHotZoneItem
=
hotZoneItem
;
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
{
}
else
{
if
(
this
.
curHotZoneItem
)
{
if
(
this
.
curHotZoneItem
)
{
this
.
curHotZoneItem
.
alpha
=
0
;
this
.
curHotZoneItem
.
alpha
=
0
;
...
@@ -915,7 +935,7 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -915,7 +935,7 @@ export class PlayComponent implements OnInit, OnDestroy {
let
answered
=
true
;
let
answered
=
true
;
this
.
hotZoneArr
.
forEach
((
item
)
=>
{
this
.
hotZoneArr
.
forEach
((
item
)
=>
{
if
(
!
item
.
answered
)
{
if
(
!
item
.
answered
)
{
answered
=
false
;
answered
=
false
;
...
@@ -1009,17 +1029,9 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -1009,17 +1029,9 @@ export class PlayComponent implements OnInit, OnDestroy {
if
(
this
.
curHotZoneItem
.
alpha
===
0
)
{
if
(
this
.
curHotZoneItem
.
alpha
===
0
)
{
this
.
magnifier
[
'
light
'
].
visible
=
true
;
this
.
magnifier
[
'
light
'
].
visible
=
true
;
this
.
magnifier
.
x
=
this
.
curHotZoneItem
.
x
;
setTimeout
(()
=>
{
this
.
magnifier
.
y
=
this
.
curHotZoneItem
.
y
+
50
*
this
.
mapScale
;
this
.
magnifier
[
'
light
'
].
visible
=
false
;
this
.
showPhotoAnima
();
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 {
...
@@ -1058,6 +1070,8 @@ export class PlayComponent implements OnInit, OnDestroy {
this
.
updateArr
(
this
.
renderArr
);
this
.
updateArr
(
this
.
renderArr
);
this
.
updateArr
(
this
.
magnifierArr
);
this
.
updateArr
(
this
.
textLabelArr
);
this
.
updateArr
(
this
.
textLabelArr
);
this
.
updateArr
(
this
.
endRenderArr
);
this
.
updateArr
(
this
.
endRenderArr
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment