Prevent image resizing while using cropperjs in angular -
i'm using cropper.js in angular2. here's html code has image container inside .my-content wrapper.
<div class="my-content"> <div class="sidebar"> <div class="my-tab"><span><i class="material-icons">crop</i></span><span>crop</span></div> <div class="my-tab active"><span>b</span><span>brand</span></div> <div></div> <div></div> <div></div> </div> <div class="detail-pane"></div> <div class="img-container"> <img src="../../../../assets/picon.png" #mainimage> </div> </div> here's css.
.my-content { @include flexbox(); @include align-items(stretch); .sidebar { font-weight: bold; background-color: rgb(235,235,235); } .detail-pane { width: 300px; @include flex(0 0 auto); background-color: rgb(245,245,245); } .img-container { @include flex(1 1 auto); overflow: hidden; } } when use cropperjs, image automatically resized container size after loaded. without it, retains actual size. want keep actual size of image while using cropperjs. have attached 2 screen shot, first without cropperjs , second cropperjs. difference notice cropperjs adds class cropper-hidden. there way prevent resizing without messing css of cropperjs?

Comments
Post a Comment