Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cc_mz_write_02
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
cc_mz_write_02
Commits
f79f863e
Commit
f79f863e
authored
Oct 25, 2022
by
limingzhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: debug
parent
5edd4a04
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
14 deletions
+25
-14
cc_mz_write_02.js
assets/cc_mz_write_02/scene/cc_mz_write_02.js
+25
-14
No files found.
assets/cc_mz_write_02/scene/cc_mz_write_02.js
View file @
f79f863e
...
...
@@ -575,7 +575,6 @@ cc.Class({
console
.
log
(
'
this.photo end
'
,
data
);
this
.
debugDrawLayer
.
removeAllChildren
();
const
isRightArea
=
this
.
checkIsRightArea
(
data
);
if
(
!
isRightArea
)
{
...
...
@@ -597,6 +596,16 @@ cc.Class({
this
.
isCanDraw
=
false
;
})
this
.
debugDrawLayer
.
removeAllChildren
();
const
benchmark1Text
=
this
.
benchmark1Data
.
labelText
const
benchmark1TextArr
=
benchmark1Text
.
split
(
'
'
);
const
benchmark1LabelData
=
this
.
getPhotoLabelData
(
benchmark1TextArr
,
data
?.
result
?.
text
);
const
benchmark2Text
=
this
.
benchmark2Data
.
labelText
const
benchmark2TextArr
=
benchmark2Text
.
split
(
'
'
);
const
benchmark2LabelData
=
this
.
getPhotoLabelData
(
benchmark2TextArr
,
data
?.
result
?.
text
);
const
answerData
=
this
.
getAnswerData
(
data
);
...
...
@@ -643,7 +652,7 @@ cc.Class({
console
.
log
(
'
benchmark1TextArr:
'
,
benchmark1TextArr
);
// const letter = this.data.letter || 'Aa';
const
benchmark1LabelData
=
this
.
getPhotoLabelData
(
benchmark1TextArr
,
text
);
const
benchmark1LabelData
=
this
.
getPhotoLabelData
(
benchmark1TextArr
,
text
,
false
);
if
(
!
benchmark1LabelData
)
{
console
.
log
(
'
!benchmark1LabelData
'
)
return
false
;
...
...
@@ -657,7 +666,7 @@ cc.Class({
const
benchmark2Text
=
this
.
benchmark2Data
.
labelText
const
benchmark2TextArr
=
benchmark2Text
.
split
(
'
'
);
const
benchmark2LabelData
=
this
.
getPhotoLabelData
(
benchmark2TextArr
,
text
);
const
benchmark2LabelData
=
this
.
getPhotoLabelData
(
benchmark2TextArr
,
text
,
false
);
if
(
!
benchmark2LabelData
)
{
return
false
;
}
...
...
@@ -1049,7 +1058,7 @@ cc.Class({
getPhotoLabelData
(
textArr
,
block
)
{
getPhotoLabelData
(
textArr
,
block
,
isShow
=
true
)
{
for
(
let
j
=
0
;
j
<
block
.
length
;
j
++
)
{
...
...
@@ -1062,16 +1071,18 @@ cc.Class({
const
sentence
=
line
.
content
;
if
(
isShow
)
{
const
label
=
this
.
getLabel
(
sentence
,
150
);
label
.
x
=
line
.
left
*
this
.
debugBgImg
.
width
;
label
.
y
=
-
(
line
.
top
+
(
line
.
bottom
-
line
.
top
)
/
2
)
*
this
.
debugBgImg
.
height
;
label
.
parent
=
this
.
debugDrawLayer
;
label
.
zIndex
=
200
;
// label.color = cc.Color.RED;
const
l
=
label
.
getComponent
(
cc
.
Label
);
label
.
anchorX
=
0
;
console
.
log
(
'
sentence~:
'
,
sentence
);
}
const
label
=
this
.
getLabel
(
sentence
,
150
);
label
.
x
=
line
.
left
*
this
.
debugBgImg
.
width
;
label
.
y
=
-
(
line
.
top
+
(
line
.
bottom
-
line
.
top
)
/
2
)
*
this
.
debugBgImg
.
height
;
label
.
parent
=
this
.
debugDrawLayer
;
label
.
zIndex
=
200
;
// label.color = cc.Color.RED;
const
l
=
label
.
getComponent
(
cc
.
Label
);
label
.
anchorX
=
0
;
console
.
log
(
'
sentence~:
'
,
sentence
);
...
...
@@ -2222,7 +2233,7 @@ cc.Class({
"
top
"
:
0.0971250981092453
,
"
bottom
"
:
0.12354312092065811
,
"
score
"
:
1
,
"
content
"
:
"
Trace,write,and say.
"
"
content
"
:
"
C
Trace,write,and say.
"
},
{
"
left
"
:
0.14084507524967194
,
...
...
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