@leafer-ui/text 1.0.0-alpha.30 → 1.0.0-bate

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leafer-ui/text",
3
- "version": "1.0.0-alpha.30",
3
+ "version": "1.0.0-bate",
4
4
  "description": "@leafer-ui/text",
5
5
  "author": "Chao (Leafer) Wan",
6
6
  "license": "MIT",
@@ -19,10 +19,10 @@
19
19
  "leaferjs"
20
20
  ],
21
21
  "dependencies": {
22
- "@leafer-ui/core": "1.0.0-alpha.30"
22
+ "@leafer-ui/core": "1.0.0-bate"
23
23
  },
24
24
  "devDependencies": {
25
- "@leafer/interface": "1.0.0-alpha.30",
26
- "@leafer-ui/interface": "1.0.0-alpha.30"
25
+ "@leafer/interface": "1.0.0-bate",
26
+ "@leafer-ui/interface": "1.0.0-bate"
27
27
  }
28
28
  }
@@ -16,9 +16,8 @@ export const TextConvert = {
16
16
 
17
17
  let x = 0, y = 0
18
18
  let { width, height, padding } = style
19
- const { textDecoration, textOverflow, fontSize, __font } = style
19
+ const { textDecoration, textOverflow, __font } = style
20
20
  if (!width) width = 0
21
- height = Math.max(height, fontSize)
22
21
 
23
22
  if (padding) {
24
23
  const [top, right, bottom, left] = MathHelper.fourNumber(padding)
@@ -4,7 +4,7 @@ export function decorationText(drawData: ITextDrawData, style: ITextData): void
4
4
  const { fontSize } = style
5
5
  drawData.decorationHeight = fontSize / 11
6
6
  switch (style.textDecoration) {
7
- case 'underline':
7
+ case 'under':
8
8
  drawData.decorationY = fontSize * 0.15
9
9
  break
10
10
  case 'delete':
package/src/TextRows.ts CHANGED
@@ -58,7 +58,7 @@ export function createRows(drawData: ITextDrawData, content: string, style: ITex
58
58
 
59
59
  realWidth = paraStart && paraIndent ? width - paraIndent : width
60
60
 
61
- if (rowWidth + wordWidth + charWidth > realWidth) { // wrap
61
+ if (width && rowWidth + wordWidth + charWidth > realWidth) { // wrap
62
62
 
63
63
  if (!afterBreak) afterBreak = charType === Letter && lastCharType == After // split ,S
64
64