Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
YM_L5_27
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
YM_L5_27
Commits
b9f23887
Commit
b9f23887
authored
Jul 08, 2021
by
范雪寒
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test: log
parent
3cede1d0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
custom-hot-zone.component.ts
src/app/common/custom-hot-zone/custom-hot-zone.component.ts
+10
-0
No files found.
src/app/common/custom-hot-zone/custom-hot-zone.component.ts
View file @
b9f23887
...
@@ -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
();
}
}
...
...
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