Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
fyge_for_tb
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
王剑峰
fyge_for_tb
Commits
dd736250
Commit
dd736250
authored
Jun 15, 2020
by
wjf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
l
parent
474b17cd
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
7 deletions
+10
-7
fyge.min.js
build/fyge.min.js
+1
-1
fyge.min.js.map
build/fyge.min.js.map
+1
-1
package.json
package.json
+1
-1
TextField.ts
src/2d/text/TextField.ts
+6
-4
ScrollList.ts
src/2d/ui/ScrollList.ts
+1
-0
No files found.
build/fyge.min.js
View file @
dd736250
This diff is collapsed.
Click to expand it.
build/fyge.min.js.map
View file @
dd736250
This diff is collapsed.
Click to expand it.
package.json
View file @
dd736250
{
{
"name"
:
"fyge-tbmini"
,
"name"
:
"fyge-tbmini"
,
"version"
:
"1.1.
2
"
,
"version"
:
"1.1.
7
"
,
"description"
:
"淘宝小程序canvas渲染引擎"
,
"description"
:
"淘宝小程序canvas渲染引擎"
,
"main"
:
"./build/fyge.min.js"
,
"main"
:
"./build/fyge.min.js"
,
"types"
:
"./build/FYGE.d.ts"
,
"types"
:
"./build/FYGE.d.ts"
,
...
...
src/2d/text/TextField.ts
View file @
dd736250
...
@@ -39,7 +39,7 @@ export class TextField extends Sprite {
...
@@ -39,7 +39,7 @@ export class TextField extends Sprite {
// canvas.width = 3;
// canvas.width = 3;
// canvas.height = 3;
// canvas.height = 3;
// if (osType == "ios") {
// if (osType == "ios") {
canvas
.
width
=
canvas
.
height
=
3
;
canvas
.
width
=
canvas
.
height
=
3
;
// } else {//现在只能用canvas2d渲染,所以不能用imageData了,等修复了安卓canvas尺寸问题再改
// } else {//现在只能用canvas2d渲染,所以不能用imageData了,等修复了安卓canvas尺寸问题再改
// canvas.width = 300;
// canvas.width = 300;
// canvas.height = 150;
// canvas.height = 150;
...
@@ -469,7 +469,7 @@ export class TextField extends Sprite {
...
@@ -469,7 +469,7 @@ export class TextField extends Sprite {
if
(
patternCh
.
test
(
str
)
||
patternChB
.
test
(
str
))
{
if
(
patternCh
.
test
(
str
)
||
patternChB
.
test
(
str
))
{
width
+=
size
;
width
+=
size
;
}
else
{
}
else
{
width
+=
size
/
2
;
width
+=
size
*
4
/
7
;
}
}
}
}
return
width
return
width
...
@@ -493,8 +493,8 @@ export class TextField extends Sprite {
...
@@ -493,8 +493,8 @@ export class TextField extends Sprite {
//如果没有文本
//如果没有文本
if
(
!
s
.
_text
)
{
if
(
!
s
.
_text
)
{
// if (osType == "ios") {
// if (osType == "ios") {
s
.
canvas
.
width
=
0
;
s
.
canvas
.
width
=
0
;
s
.
canvas
.
height
=
0
;
s
.
canvas
.
height
=
0
;
// } else {//暂时不能用sourceData形式,所以和上面效果一样
// } else {//暂时不能用sourceData形式,所以和上面效果一样
// s.texture.baseTexture.source.width = 0;
// s.texture.baseTexture.source.width = 0;
// s.texture.baseTexture.source.height = 0;
// s.texture.baseTexture.source.height = 0;
...
@@ -605,6 +605,8 @@ export class TextField extends Sprite {
...
@@ -605,6 +605,8 @@ export class TextField extends Sprite {
upY
=
s
.
_textHeight
-
trueHeight
;
upY
=
s
.
_textHeight
-
trueHeight
;
}
}
}
}
//@ts-ignore
my
&&
(
upY
-=
4
);
for
(
let
i
=
0
;
i
<
realLines
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
realLines
.
length
;
i
++
)
{
let
ox
=
0
;
let
ox
=
0
;
//@ts-ignore 现在貌似小程序的textAlign有点问题,如果修复了再说
//@ts-ignore 现在貌似小程序的textAlign有点问题,如果修复了再说
...
...
src/2d/ui/ScrollList.ts
View file @
dd736250
...
@@ -91,6 +91,7 @@ export class ScrollList extends ScrollPage {
...
@@ -91,6 +91,7 @@ export class ScrollList extends ScrollPage {
}
}
s
.
_isInit
=
1
;
s
.
_isInit
=
1
;
s
.
_lastFirstId
=
-
1
;
s
.
_lastFirstId
=
-
1
;
s
.
_updateId
=
-
1
;
//确保会刷新
s
.
maxDistance
=
Math
.
ceil
(
s
.
data
.
length
/
s
.
_cols
)
*
s
.
_itemRow
;
s
.
maxDistance
=
Math
.
ceil
(
s
.
data
.
length
/
s
.
_cols
)
*
s
.
_itemRow
;
if
(
s
.
downL
)
{
if
(
s
.
downL
)
{
s
.
downL
[
s
.
paramXY
]
=
Math
.
max
(
s
.
distance
,
s
.
maxDistance
);
s
.
downL
[
s
.
paramXY
]
=
Math
.
max
(
s
.
distance
,
s
.
maxDistance
);
...
...
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