Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
JM_4-1
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
JM_4-1
Commits
50064f04
Commit
50064f04
authored
Sep 18, 2021
by
limingzhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 滚动条背景尺寸调节
parent
ca9d44f4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
play.component.ts
src/app/play/play.component.ts
+6
-5
No files found.
src/app/play/play.component.ts
View file @
50064f04
...
...
@@ -898,19 +898,19 @@ export class PlayComponent implements OnInit, OnDestroy {
submitBtn
;
btnArr
=
[];
btnDisH
=
120
;
initBtn
()
{
this
.
topArr
=
[];
const
btnArr
=
[];
let
arr
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
sentenceArr
))
;
// arr = arr.concat(arr[0]);
arr
=
randomSortByArr
(
arr
);
if
(
!
arr
)
{
return
;
}
const
disW
=
400
*
this
.
mapScale
;
const
disH
=
120
*
this
.
mapScale
;
const
disH
=
this
.
btnDisH
*
this
.
mapScale
;
const
tmpLen
=
arr
.
length
>
5
?
5
:
arr
.
length
;
let
baseX
=
this
.
canvasWidth
/
2
-
(
tmpLen
-
1
)
*
disW
/
2
let
baseY
=
this
.
canvasHeight
/
2
-
380
*
this
.
mapScale
;
...
...
@@ -1067,12 +1067,13 @@ export class PlayComponent implements OnInit, OnDestroy {
sentenceEmptyArr
;
initSentence
()
{
const
tmpY
=
this
.
btnArr
[
this
.
btnArr
.
length
-
1
].
y
;
const
row
=
Math
.
floor
(
(
this
.
btnArr
.
length
-
1
)
/
5
)
+
1
;
const
subH
=
row
*
this
.
btnDisH
;
const
sv
=
new
ScrollView
();
sv
.
setShowSize
(
this
.
panel
.
width
,
1250
-
tmpY
);
sv
.
setShowSize
(
this
.
panel
.
width
,
900
-
subH
);
sv
.
x
=
-
this
.
panel
.
width
/
2
;
sv
.
y
=
tmpY
-
720
;
sv
.
y
=
-
395
+
subH
;
sv
.
setBgColor
(
'
#faf7ee
'
)
// sv.setMapScale(this.mapScale);
// sv.content.setScaleXY(1/this.mapScale);
...
...
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