@leafer-ui/data 2.0.8 → 2.1.0

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/data",
3
- "version": "2.0.8",
3
+ "version": "2.1.0",
4
4
  "description": "@leafer-ui/data",
5
5
  "author": "Chao (Leafer) Wan",
6
6
  "license": "MIT",
@@ -22,11 +22,11 @@
22
22
  "leaferjs"
23
23
  ],
24
24
  "dependencies": {
25
- "@leafer/core": "2.0.8",
26
- "@leafer-ui/external": "2.0.8"
25
+ "@leafer/core": "2.1.0",
26
+ "@leafer-ui/external": "2.1.0"
27
27
  },
28
28
  "devDependencies": {
29
- "@leafer/interface": "2.0.8",
30
- "@leafer-ui/interface": "2.0.8"
29
+ "@leafer/interface": "2.1.0",
30
+ "@leafer-ui/interface": "2.1.0"
31
31
  }
32
32
  }
package/src/UIData.ts CHANGED
@@ -22,7 +22,10 @@ export class UIData extends LeafData implements IUIData {
22
22
 
23
23
  public get __strokeWidth(): number { return this.__getRealStrokeWidth() }
24
24
 
25
- public get __maxStrokeWidth(): number { const t = this as IUIData; return t.__hasMultiStrokeStyle ? Math.max(t.__hasMultiStrokeStyle, t.strokeWidth) : t.strokeWidth }
25
+ public get __maxStrokeWidth(): number {
26
+ const t = this as IUIData, strokeWidth = t.__hasStrokeSides || t.strokeWidth
27
+ return t.__hasMultiStrokeStyle ? Math.max(t.__hasMultiStrokeStyle, strokeWidth) : strokeWidth
28
+ }
26
29
 
27
30
  public __hasMultiStrokeStyle?: number // 是否存在多个不同的描述样式(同时存储多个描边样式中的最大宽度用于运算)
28
31
 
@@ -154,6 +157,11 @@ export class UIData extends LeafData implements IUIData {
154
157
  return strokeWidth
155
158
  }
156
159
 
160
+ public __checkComplex(): void {
161
+ const t = this as IUIData
162
+ stintSet(t, '__complex', (t.__isFills || t.__isStrokes || t.cornerRadius || t.__useEffect) as boolean)
163
+ }
164
+
157
165
 
158
166
  public __setPaint(attrName: 'fill' | 'stroke', value: IValue): void {
159
167
  this.__setInput(attrName, value)
package/types/index.d.ts CHANGED
@@ -42,6 +42,7 @@ declare class UIData extends LeafData implements IUIData {
42
42
  protected setFilter(value: IValue): void;
43
43
  __computePaint(): void;
44
44
  __getRealStrokeWidth(childStyle?: IStrokeComputedStyle): number;
45
+ __checkComplex(): void;
45
46
  __setPaint(attrName: 'fill' | 'stroke', value: IValue): void;
46
47
  __removePaint(attrName: 'fill' | 'stroke', removeInput?: boolean): void;
47
48
  }