Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
op_09
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
op_09
Commits
a2fea002
Commit
a2fea002
authored
Sep 23, 2021
by
范雪寒
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 选项大小
parent
85f1aaf6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
op_09.js
play/assets/op_09/scene/op_09.js
+2
-2
No files found.
play/assets/op_09/scene/op_09.js
View file @
a2fea002
...
@@ -172,7 +172,7 @@ cc.Class({
...
@@ -172,7 +172,7 @@ cc.Class({
const
canvasHeight
=
cc
.
find
(
'
Canvas
'
).
height
;
const
canvasHeight
=
cc
.
find
(
'
Canvas
'
).
height
;
const
optionNum
=
this
.
data
.
question_arr
[
questionIdx
].
option_arr
.
length
;
const
optionNum
=
this
.
data
.
question_arr
[
questionIdx
].
option_arr
.
length
;
const
maxOptionHeight
=
500
;
const
maxOptionHeight
=
500
;
const
maxOptionWidth
=
canvasWidth
/
optionNum
;
const
maxOptionWidth
=
(
canvasWidth
-
20
)
/
optionNum
;
const
arr
=
randomSortByArr
(
this
.
data
.
question_arr
[
questionIdx
].
option_arr
);
const
arr
=
randomSortByArr
(
this
.
data
.
question_arr
[
questionIdx
].
option_arr
);
arr
.
forEach
(
async
(
option
,
idx
)
=>
{
arr
.
forEach
(
async
(
option
,
idx
)
=>
{
...
@@ -184,7 +184,7 @@ cc.Class({
...
@@ -184,7 +184,7 @@ cc.Class({
optionNode
.
parent
=
box
;
optionNode
.
parent
=
box
;
cc
.
tween
(
optionNode
)
cc
.
tween
(
optionNode
)
.
to
(
0.1
,
{
scale
:
Math
.
min
((
maxOptionWidth
-
10
)
/
optionNode
.
width
,
maxOptionHeight
/
optionNode
.
height
)
})
.
to
(
0.1
,
{
scale
:
Math
.
min
(
1
,
(
maxOptionWidth
-
10
)
/
optionNode
.
width
,
maxOptionHeight
/
optionNode
.
height
)
})
.
start
();
.
start
();
});
});
},
},
...
...
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