Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
middleLayer_for_kyxq
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
middleLayer_for_kyxq
Commits
515acfb2
Commit
515acfb2
authored
Nov 01, 2023
by
limingzhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: debug
parent
144ca130
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
HomePage.ts
assets/middleLayer_for_kyxq/script/HomePage.ts
+12
-2
No files found.
assets/middleLayer_for_kyxq/script/HomePage.ts
View file @
515acfb2
...
@@ -96,9 +96,15 @@ export default class NewClass extends cc.Component {
...
@@ -96,9 +96,15 @@ export default class NewClass extends cc.Component {
jc_arr
:
userInfo
.
jc_arr
,
jc_arr
:
userInfo
.
jc_arr
,
});
});
const
canvas
=
cc
.
find
(
"
Canvas
"
);
this
.
SvContent
.
opacity
=
0
;
this
.
SvContent
.
opacity
=
0
;
if
(
!
this
.
SvContent
[
'
baseH
'
])
{
this
.
SvContent
[
'
baseH
'
]
=
this
.
SvContent
.
height
;
this
.
SvContent
.
height
*=
canvas
.
height
/
1080
;
this
.
SvContent
.
parent
.
height
=
this
.
SvContent
.
height
;
}
let
loadEndCount
=
0
;
let
loadEndCount
=
0
;
// rows.length = 2;
for
(
let
i
=
0
;
i
<
rows
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
rows
.
length
;
i
++
)
{
const
row
=
rows
[
i
];
const
row
=
rows
[
i
];
...
@@ -142,7 +148,6 @@ export default class NewClass extends cc.Component {
...
@@ -142,7 +148,6 @@ export default class NewClass extends cc.Component {
this
.
SvContent
.
opacity
=
255
;
this
.
SvContent
.
opacity
=
255
;
const
contentW
=
this
.
SvContent
.
getContentSize
().
width
;
const
contentW
=
this
.
SvContent
.
getContentSize
().
width
;
const
canvas
=
cc
.
find
(
"
Canvas
"
);
if
(
contentW
<
canvas
.
width
)
{
if
(
contentW
<
canvas
.
width
)
{
// this.SvContent.x = 0;
// this.SvContent.x = 0;
this
.
SvContent
.
x
=
-
contentW
/
2
;
this
.
SvContent
.
x
=
-
contentW
/
2
;
...
@@ -153,6 +158,11 @@ export default class NewClass extends cc.Component {
...
@@ -153,6 +158,11 @@ export default class NewClass extends cc.Component {
this
.
loading
.
active
=
false
;
this
.
loading
.
active
=
false
;
}
}
});
});
const
scale
=
canvas
.
height
/
1080
;
ci
.
width
*=
scale
;
ci
.
height
*=
scale
;
ci
.
scale
=
scale
;
this
.
SvContent
.
addChild
(
ci
);
this
.
SvContent
.
addChild
(
ci
);
console
.
log
(
"
this.canvas.width:
"
,
cc
.
find
(
"
Canvas
"
).
width
)
console
.
log
(
"
this.canvas.width:
"
,
cc
.
find
(
"
Canvas
"
).
width
)
...
...
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