Closed mcblum closed 7 years ago
Is there anything we can do to force the canvas element to expand?
Ok, so I did get this to work. I modified the directive to wrap the onResize function in a 600ms $timeout. Also, I set the width and the height of the canvas to the width and the height of the parent element. Should I submit a PR or is this not exactly how you want it to work?
can you show your onResize code - I am getting same issue and it really buggin me :)
@mcblum This looks like an old issue. Did you try the master branch?
Agreed it is an old issue, but you will keep having this question until a new release is provided :)
@jasny I did! I pushed the project with the most recent version (master branch) and the issue actually got worse.
@hplloyd here's what I did to the scope.onResize
function:
scope.onResize = function () {
$timeout(function () {
var canvas = element.find('canvas')[0];
canvas.width = element[0].offsetWidth;
canvas.height = element[0].offsetHeight;
}, 600);
};
I'm not sure if this has other consequences, I know I removed the code which compensated for pixel density but I didn't care as much if the signature looked a little blurry just as long as people could sign.
Released v1.0.0. Considering this solved.
@mcblum If you still have an issue with v1.0, please create a jsfiddle that demonstrates it.
So I finally figured how what our issue is, sorry to keep bugging you about it: