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
3cede1d0
Commit
3cede1d0
authored
Jul 08, 2021
by
范雪寒
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test: log
parent
6ffeaf37
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
custom-hot-zone.component.ts
src/app/common/custom-hot-zone/custom-hot-zone.component.ts
+5
-0
No files found.
src/app/common/custom-hot-zone/custom-hot-zone.component.ts
View file @
3cede1d0
...
...
@@ -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
;
...
...
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