Open subatomicglue opened 6 years ago
Hi, I have the same problem. any solution yet?
Same problem
Fixed this issue by adding a class to canvas.
in your component CropperSettings add --> this.cropperSettings.cropperClass = 'your-class' and then in main scss add --> .imgCropper{ width: 100% !important;}
hope this will help someone. :)
I can't get dynamicSizing to work. It keeps setting the canvas to 300x150 I am trying to have a responsive design that takes up the full width of the iPhone screen in safari.
Angular2 component:
Component template HTML:
Component CSS:
Viewing in the browser, using inspect, I can see the canvas is 300x150. Resizing the browser does not change this. The parent element is definitely larger than 150
Debugging in Chrome I can see that the canvas initializes on the page as
But if I resize the browser window, this seemingly arbitrary 300x150 pops in!
There is nothing I can change, to get 300x150 to change. Unless I set dynamicSizing=false, then it'll initialize to whatever I have in
this.cropperSettings.canvasWidth
andthis.cropperSettings.canvasHeight
.Also using
100%
incanvasWidth
andcanvasHeight
doesn't work:It generates the canvas correctly:
But the element doesn't respond. It stays a tiny grey square in a sea of green:
Any ideas?