scale fake input canvas up to prevent blur on mobile

This commit is contained in:
jean-emmanuel 2016-06-05 16:47:06 +02:00
parent cc00552281
commit 3ce7e8e7b4
2 changed files with 6 additions and 6 deletions

View file

@ -23,8 +23,8 @@ var startEvent = 'ontouchstart' in window ?'touchstart':'mousedown'
canvas.resize(function(e){
e.stopPropagation()
var width = canvas.width(),
height = canvas.height()
var width = canvas.width()*2,
height = canvas.height()*2
if (height==100 && width==100) return
@ -51,7 +51,7 @@ var startEvent = 'ontouchstart' in window ?'touchstart':'mousedown'
if (!self.height || !self.width || (self.height==100 && self.width==100)) return
ctx.clearRect(0,0,self.width,self.height)
ctx.font = PXSCALE * 13 + 'px Droid Sans'
ctx.font = PXSCALE * 2 * 13 + 'px Droid Sans'
ctx.textBaseline = "top"
ctx.fillStyle = self.color