@leafer-ui/paint 2.1.4 → 2.1.6

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/paint",
3
- "version": "2.1.4",
3
+ "version": "2.1.6",
4
4
  "description": "@leafer-ui/paint",
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.1.4",
26
- "@leafer-ui/draw": "2.1.4"
25
+ "@leafer/core": "2.1.6",
26
+ "@leafer-ui/draw": "2.1.6"
27
27
  },
28
28
  "devDependencies": {
29
- "@leafer/interface": "2.1.4",
30
- "@leafer-ui/interface": "2.1.4"
29
+ "@leafer/interface": "2.1.6",
30
+ "@leafer-ui/interface": "2.1.6"
31
31
  }
32
32
  }
package/src/Compute.ts CHANGED
@@ -57,7 +57,7 @@ export function compute(attrName: IPaintAttr, ui: IUI): void {
57
57
  }
58
58
 
59
59
 
60
- function getLeafPaint(attrName: string, paint: IPaint, ui: IUI): ILeafPaint {
60
+ function getLeafPaint(attrName: IPaintAttr, paint: IPaint, ui: IUI): ILeafPaint {
61
61
  if (!isObject(paint) || paint.visible === false || paint.opacity === 0) return undefined
62
62
 
63
63
  let leafPaint: ILeafPaint
package/src/Stroke.ts CHANGED
@@ -5,7 +5,7 @@ import { IUI, ILeafPaint } from '@leafer-ui/interface'
5
5
  import { Paint } from '@leafer-ui/draw'
6
6
 
7
7
 
8
- export function stroke(stroke: string, ui: IUI, canvas: ILeaferCanvas, renderOptions: IRenderOptions): void {
8
+ export function stroke(stroke: string | ILeafPaint[], ui: IUI, canvas: ILeaferCanvas, renderOptions: IRenderOptions): void {
9
9
  const data = ui.__
10
10
  if (!data.__strokeWidth) return
11
11
 
@@ -36,7 +36,7 @@ export function stroke(stroke: string, ui: IUI, canvas: ILeaferCanvas, renderOpt
36
36
 
37
37
 
38
38
  export function strokes(strokes: ILeafPaint[], ui: IUI, canvas: ILeaferCanvas, renderOptions: IRenderOptions): void {
39
- Paint.stroke(strokes as any, ui, canvas, renderOptions)
39
+ Paint.stroke(strokes, ui, canvas, renderOptions)
40
40
  }
41
41
 
42
42