Skip to content

Commit

Permalink
[update] queryCanvas 方法失败时调用 reject
Browse files Browse the repository at this point in the history
  • Loading branch information
kiccer committed Aug 26, 2021
1 parent b4dcfe7 commit 36a0742
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
</div>
<br />
<div align="center">
<img src="https://img.shields.io/badge/version-2.4.0-blue?style=flat-square&logo" />
<img src="https://img.shields.io/badge/total%20%20size-33.28%20%20KB-brightgreen?style=flat-square&logo" />
<img src="https://img.shields.io/badge/main%20%20size-6.90%20%20KB-brightgreen?style=flat-square&logo" />
<img src="https://img.shields.io/badge/version-2.4.1-blue?style=flat-square&logo" />
<img src="https://img.shields.io/badge/total%20%20size-33.33%20%20KB-brightgreen?style=flat-square&logo" />
<img src="https://img.shields.io/badge/main%20%20size-6.95%20%20KB-brightgreen?style=flat-square&logo" />
<img src="https://img.shields.io/npm/dt/wx-canvas-2d.svg?style=flat-square&logo=appveyor&logo" />
<br />
<img src="https://img.shields.io/github/issues/kiccer/wx-canvas-2d?style=flat-square&logo=appveyor&logo" />
Expand Down
2 changes: 1 addition & 1 deletion miniprogram_dist/WxCanvas2d.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wx-canvas-2d",
"version": "2.4.0",
"version": "2.4.1",
"description": "微信小程序 canvas-2d 绘图工具,支持按需引用,支持内容配置,支持功能扩展,适配各种机型,超轻量,超易用,无需学习,直接上手。",
"main": "miniprogram_dist",
"miniprogram": "miniprogram_dist",
Expand Down Expand Up @@ -29,15 +29,16 @@
"webpack-cli": "^4.1.0"
},
"scripts": {
"gulp-dev": "gulp",
"gulp-dev": "gulp --watch",
"gulp-build": "gulp",
"dev": "exit && webpack --config webpack.config.js",
"lint-fix": "eslint --fix --ext .js pages components res app.js",
"test": "echo \"Error: no test specified\" && exit 1",
"docs:dev": "vuepress dev doc",
"docs:build": "vuepress build doc",
"postinstall": "node ./postinstall.js",
"build:postinstall": "node ./scripts/postinstall-build.js",
"prepublish": "npm run build:md & npm run build:postinstall",
"prepublish": "npm run gulp-build && (npm run build:md & npm run build:postinstall)",
"build:md": "node ./scripts/md.js"
},
"repository": {
Expand Down
4 changes: 4 additions & 0 deletions plugin/WxCanvas2d.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ class WxCanvas2d {
// this.ctx.scale(this.dpr, this.dpr)

resolve()
}).catch(err => {
reject(err)
})
})
}
Expand Down Expand Up @@ -188,6 +190,8 @@ class WxCanvas2d {

this.debugLogout('开始绘制')
next() // 开始按顺序绘制图层
}).catch(err => {
reject(err)
})
})
}
Expand Down

0 comments on commit 36a0742

Please sign in to comment.