Closed jasny closed 7 years ago
This should solve #11 #16 #19 #27 #31 #33
@jasny @KillaBee1985 This update, I believe, broke the directive. See issue #38 for reference and fix. It looks like it was a commit from @KillaBee1985 (see the following commit https://github.com/legalthings/angular-signature/commit/df28083f41b557184f340cb26765881b8eb253ec )
@btcpbordeaux this is already fixed. See #36
The canvas should
height
andwidth
if the container allows it. However is the container is smaller than the specified dimensions, for example because of a small viewport (on a mobile phone) or because of a small modal, the canvas should be scaled down to fit the container usingcanvas.getContext("2d").scale()
. It should respect the aspect ratio.The container
<div>
should not have a fixed width and height, but have amax-width
andmax-height
instead. The container should always fit within the container<div>
, but maintaining it's aspect ratio (so the container is a bounding box).Currently there is an
$timeout
of 500 milliseconds. This is completely arbitrary. Also there is callback for thewindow.resize
event, but that also doesn't cut it, because there are other reasons why the container may change in size. The plugin should simply always make sure that the canvas fits (using$interval
or some better way).