Skip to content

Commit

Permalink
feat(types): types canvas (NervJS#14793)
Browse files Browse the repository at this point in the history
* feat(types): update canvas api & add Path2D API

* feat(types): update CanvasGradient @supported

* feat(types): 更新canvas方法api

* feat(types): update h5 canvas TextBaseLineMap

* lint: CanvasContext.ts

---------

Co-authored-by: Zakary <zakarycode@gmail.com>
  • Loading branch information
smileying and ZakaryCode authored Dec 29, 2023
1 parent fe263a2 commit 67d6891
Show file tree
Hide file tree
Showing 2 changed files with 368 additions and 62 deletions.
5 changes: 4 additions & 1 deletion packages/taro-h5/src/api/canvas/CanvasContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ const TextBaseLineMap: Record<keyof Taro.CanvasContext.TextBaseline, CanvasTextB
top: 'top',
bottom: 'bottom',
middle: 'middle',
normal: 'alphabetic'
normal: 'alphabetic',
hanging: 'hanging',
alphabetic: 'alphabetic',
ideographic: 'ideographic'
}

export class CanvasContext implements Taro.CanvasContext {
Expand Down
Loading

0 comments on commit 67d6891

Please sign in to comment.