Commit dd736250 authored by wjf's avatar wjf

l

parent 474b17cd
This diff is collapsed.
This diff is collapsed.
{
"name": "fyge-tbmini",
"version": "1.1.2",
"version": "1.1.7",
"description": "淘宝小程序canvas渲染引擎",
"main": "./build/fyge.min.js",
"types": "./build/FYGE.d.ts",
......
......@@ -39,7 +39,7 @@ export class TextField extends Sprite {
// canvas.width = 3;
// canvas.height = 3;
// if (osType == "ios") {
canvas.width = canvas.height = 3;
canvas.width = canvas.height = 3;
// } else {//现在只能用canvas2d渲染,所以不能用imageData了,等修复了安卓canvas尺寸问题再改
// canvas.width = 300;
// canvas.height = 150;
......@@ -469,7 +469,7 @@ export class TextField extends Sprite {
if (patternCh.test(str) || patternChB.test(str)) {
width += size;
} else {
width += size / 2;
width += size * 4 / 7;
}
}
return width
......@@ -493,8 +493,8 @@ export class TextField extends Sprite {
//如果没有文本
if (!s._text) {
// if (osType == "ios") {
s.canvas.width = 0;
s.canvas.height = 0;
s.canvas.width = 0;
s.canvas.height = 0;
// } else {//暂时不能用sourceData形式,所以和上面效果一样
// s.texture.baseTexture.source.width = 0;
// s.texture.baseTexture.source.height = 0;
......@@ -605,6 +605,8 @@ export class TextField extends Sprite {
upY = s._textHeight - trueHeight;
}
}
//@ts-ignore
my && (upY -= 4);
for (let i = 0; i < realLines.length; i++) {
let ox = 0;
//@ts-ignore 现在貌似小程序的textAlign有点问题,如果修复了再说
......
......@@ -91,6 +91,7 @@ export class ScrollList extends ScrollPage {
}
s._isInit = 1;
s._lastFirstId = -1;
s._updateId = -1;//确保会刷新
s.maxDistance = Math.ceil(s.data.length / s._cols) * s._itemRow;
if (s.downL) {
s.downL[s.paramXY] = Math.max(s.distance, s.maxDistance);
......
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