Commit 50691f21 authored by limingzhe's avatar limingzhe

fix: debug

parent 5bf17130
......@@ -2669,13 +2669,20 @@ cc.Class({
getTempWordArr(line, splitText) {
if (line.characters) {
return getArrByCharacters(line);
}
const lineBox = {left: line.left, top: line.top, right: line.right, bottom: line.bottom};
const baseX = lineBox.left;
let textIndex = 0;
const oneDisW = (lineBox.right - lineBox.left) / line.content.length;
const arr = line.content.split(splitText);
let arr = line.content.split(splitText);
const wordArr = [];
for (let i=0; i<arr.length; i++) {
const content = arr[i];
......@@ -2693,6 +2700,26 @@ cc.Class({
return wordArr;
},
getArrByCharacters(line) {
const wordArr = [];
const arr = line.characters;
for (let i=0; i<arr.length; i++) {
const {character, poly} = arr[i];
const content = character;
const location = {}
location.left = poly[0];
location.top = poly[1];
location.right = poly[2];
location.bottom = poly[7];
wordArr.push({content, location});
}
return wordArr;
},
getPhotoWordArr(text, block, benchmark1Data) {
const wordArr = [];
......
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