Commit 2dd312e2 authored by limingzhe's avatar limingzhe

fix: debug

parent f15f001d
No preview for this file type
{"ver":"1.1.2","uuid":"e9f579c0-59b7-4567-93ad-5b17f799e827","isBundle":false,"bundleName":"","priority":1,"compressionType":{},"optimizeHotUpdate":{},"inlineSpriteFrames":{},"isRemoteBundle":{"ios":false,"android":false},"subMetas":{}}
\ No newline at end of file
{
"ver": "1.1.2",
"uuid": "e9f579c0-59b7-4567-93ad-5b17f799e827",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {
"ios": false,
"android": false
},
"subMetas": {}
}
\ No newline at end of file
......@@ -3722,52 +3722,99 @@ cc.Class({
const rect = colorRect.ccRect;
let targetLabelText = colorRect.labelText;
for (let i=0; i<dotArr.length; i++) {
let {dotRect, labelText, key} = dotArr[i];
const checkIsContains = (dotRect, labelText, key)=> {
// console.log('targetLabelText.toLowerCase() : ', targetLabelText.toLowerCase() );
// console.log('labelText.toLowerCase() : ', labelText.toLowerCase() );
// console.log('rect.intersects(dotRect) : ', rect.intersects(dotRect) );
if (specialLetterArr.indexOf(labelText) != -1 ) {
labelText = labelText.toLowerCase();
targetLabelText = targetLabelText.toLowerCase();
// console.log(' in small letter');
}
if (labelText.indexOf(targetLabelText) != -1 && dotRect.intersects(rect)) {
// if (labelText.indexOf(targetLabelText) != -1 && rect.intersects(dotRect)) {
// if (labelText.toLowerCase().indexOf(targetLabelText.toLowerCase()) != -1 && rect.intersects(dotRect)) {
const len = targetLabelText.trim().length;
// console.log('len: ', len);
if (!answerData[key]) {
answerData[key] = {colorRect, count: len};
} else {
answerData[key].count += len;
// console.log('len: ', len);
// console.log(' answerData[key].count: ', answerData[key].count);
}
if ( labelText.length <= 1) {
answerData[key].isFinish = true;
answerData[key].line = line;
return true;
} else {
if (answerData[key].count >= labelText.length) {
answerData[key].isFinish = true;
answerData[key].line = line;
return true;
}
}
}
}
// return;
for (let i=0; i<dotArr.length; i++) {
let {dotRect, labelText, key} = dotArr[i];
// console.log('targetLabelText.toLowerCase() : ', targetLabelText.toLowerCase() );
// console.log('labelText.toLowerCase() : ', labelText.toLowerCase() );
// console.log('rect.intersects(dotRect) : ', rect.intersects(dotRect) );
if (labelText.indexOf("||") != -1) {
const labelTextArr = labelText.split("||");
for (let j=0; j<labelTextArr.length; j++) {
const isContains = checkIsContains(dotRect, labelTextArr[j], key);
if (isContains) {
break;
}
}
} else {
checkIsContains(dotRect, labelText, key);
}
// if (specialLetterArr.indexOf(labelText) != -1 ) {
// labelText = labelText.toLowerCase();
// targetLabelText = targetLabelText.toLowerCase();
// // console.log(' in small letter');
// }
// if (labelText.indexOf(targetLabelText) != -1 && dotRect.intersects(rect)) {
// // if (labelText.indexOf(targetLabelText) != -1 && rect.intersects(dotRect)) {
// // if (labelText.toLowerCase().indexOf(targetLabelText.toLowerCase()) != -1 && rect.intersects(dotRect)) {
// const len = targetLabelText.trim().length;
// // console.log('len: ', len);
// if (!answerData[key]) {
// answerData[key] = {colorRect, count: len};
// } else {
// answerData[key].count += len;
// // console.log('len: ', len);
// // console.log(' answerData[key].count: ', answerData[key].count);
// }
// if ( labelText.length <= 1) {
// answerData[key].isFinish = true;
// answerData[key].line = line;
// } else {
// if (answerData[key].count >= labelText.length) {
// answerData[key].isFinish = true;
// answerData[key].line = line;
// }
// }
// // return;
// }
}
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment