You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
for exaple on initial i set viewport: { width: 200, height: 100, type: 'square' },
and result result({ type:"base64", format:'jpg', backgroundColor : "#ffffff", size:{ width:400, height:200 }
When image is drag away outside viewport i get black image 400x200px in white rectangle 200x100
To improve to the code function _getCanvas
Instead of if (data.backgroundColor) { ctx.fillStyle = data.backgroundColor; ctx.fillRect(0, 0, outWidth, outHeight); }
should be changed to if (data.backgroundColor) { ctx.fillStyle = data.backgroundColor; ctx.fillRect(0, 0, canvas.width, canvas.height); }
The text was updated successfully, but these errors were encountered:
for exaple on initial i set
viewport: { width: 200, height: 100, type: 'square' },
and result
result({ type:"base64", format:'jpg', backgroundColor : "#ffffff", size:{ width:400, height:200 }
When image is drag away outside viewport i get black image 400x200px in white rectangle 200x100
To improve to the code function _getCanvas
Instead of
if (data.backgroundColor) { ctx.fillStyle = data.backgroundColor; ctx.fillRect(0, 0, outWidth, outHeight); }
should be changed to
if (data.backgroundColor) { ctx.fillStyle = data.backgroundColor; ctx.fillRect(0, 0, canvas.width, canvas.height); }
The text was updated successfully, but these errors were encountered: