提交 fc05148a 编写于 作者: D DCloud_LXH

fix: __hidpi__ fillText、strokeText maxWidth

上级 e52fabd7
...@@ -106,7 +106,7 @@ if (pixelRatio !== 1) { ...@@ -106,7 +106,7 @@ if (pixelRatio !== 1) {
args[1] *= pixelRatio args[1] *= pixelRatio
args[2] *= pixelRatio args[2] *= pixelRatio
args[3] *= pixelRatio args[3] *= pixelRatio
typeof args[3] !== 'number' && (args.length = 3) isNaN(args[3]) && (args.length = 3)
// Safari 重新设置部分属性会导致其他值恢复默认,需获取原始值 // Safari 重新设置部分属性会导致其他值恢复默认,需获取原始值
var font = this.__font__ || this.font var font = this.__font__ || this.font
...@@ -128,12 +128,12 @@ if (pixelRatio !== 1) { ...@@ -128,12 +128,12 @@ if (pixelRatio !== 1) {
if (!this.__hidpi__) { if (!this.__hidpi__) {
return _super.apply(this, arguments) return _super.apply(this, arguments)
} }
var args = Array.prototype.slice.call(arguments) const args = Array.prototype.slice.call(arguments)
args[1] *= pixelRatio // x args[1] *= pixelRatio // x
args[2] *= pixelRatio // y args[2] *= pixelRatio // y
args[3] *= pixelRatio // y args[3] *= pixelRatio // maxWidth
typeof args[3] !== 'number' && (args.length = 3) isNaN(args[3]) && (args.length = 3)
// Safari 重新设置部分属性会导致其他值恢复默认,需获取原始值 // Safari 重新设置部分属性会导致其他值恢复默认,需获取原始值
var font = this.__font__ || this.font var font = this.__font__ || this.font
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册