@leafer-ui/display 1.9.0 → 1.9.1

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.
Files changed (2) hide show
  1. package/package.json +8 -8
  2. package/src/Text.ts +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leafer-ui/display",
3
- "version": "1.9.0",
3
+ "version": "1.9.1",
4
4
  "description": "@leafer-ui/display",
5
5
  "author": "Chao (Leafer) Wan",
6
6
  "license": "MIT",
@@ -22,14 +22,14 @@
22
22
  "leaferjs"
23
23
  ],
24
24
  "dependencies": {
25
- "@leafer/core": "1.9.0",
26
- "@leafer-ui/data": "1.9.0",
27
- "@leafer-ui/display-module": "1.9.0",
28
- "@leafer-ui/decorator": "1.9.0",
29
- "@leafer-ui/external": "1.9.0"
25
+ "@leafer/core": "1.9.1",
26
+ "@leafer-ui/data": "1.9.1",
27
+ "@leafer-ui/display-module": "1.9.1",
28
+ "@leafer-ui/decorator": "1.9.1",
29
+ "@leafer-ui/external": "1.9.1"
30
30
  },
31
31
  "devDependencies": {
32
- "@leafer/interface": "1.9.0",
33
- "@leafer-ui/interface": "1.9.0"
32
+ "@leafer/interface": "1.9.1",
33
+ "@leafer-ui/interface": "1.9.1"
34
34
  }
35
35
  }
package/src/Text.ts CHANGED
@@ -115,7 +115,7 @@ export class Text extends UI implements IText {
115
115
  data.__letterSpacing = UnitConvert.number(letterSpacing, fontSize)
116
116
  data.__padding = padding ? MathHelper.fourNumber(padding) : undefined
117
117
  data.__baseLine = data.__lineHeight - (data.__lineHeight - fontSize * 0.7) / 2 // 基线位置
118
- data.__font = `${italic ? 'italic ' : ''}${textCase === 'small-caps' ? 'small-caps ' : ''}${fontWeight !== 'normal' ? fontWeight + ' ' : ''}${fontSize}px ${fontFamily}`
118
+ data.__font = `${italic ? 'italic ' : ''}${textCase === 'small-caps' ? 'small-caps ' : ''}${fontWeight !== 'normal' ? fontWeight + ' ' : ''}${fontSize || 12}px ${fontFamily || 'caption'}`
119
119
  data.__clipText = textOverflow !== 'show' && !data.__autoSize
120
120
 
121
121
  data.__textDrawData = TextConvert.getDrawData((data.__isPlacehold = data.placeholder && data.text === '') ? data.placeholder : data.text, this.__)