修正 

This commit is contained in:
Donal 2020-09-11 18:31:21 +08:00
parent 25e17bbf83
commit a846fe6e73
2 changed files with 1 additions and 1 deletions

View File

@ -186,7 +186,6 @@ export default {
const ph = parseFloat(mycanvas.style.height.replace('px',''));
const w = boundary.w > pw ? pw: boundary.w;
const h = boundary.h > ph ? ph :boundary.h;
console.log(w);
div.setAttribute('style', `position: absolute; left: ${boundary.x<0?0:boundary.x}px; top: ${boundary.y<0?0:boundary.y}px; width: ${w}px; height: ${h}px`)
mycanvas.appendChild(div);
}

View File

@ -132,6 +132,7 @@ export const calTextPoint = function (textCode) {
if (textStr) {
textStr += '';
textStr = decodeHtml(textStr);
textStr = textStr.replaceAll('&#x20;', ' ');
for (let i = 0; i < textStr.length; i++) {
if (i > 0 && deltaXList.length > 0) {
x += deltaXList[(i - 1)];