angular-image-crop icon indicating copy to clipboard operation
angular-image-crop copied to clipboard

how do i add my CSS classes to your crop button?

Open mfrederickson opened this issue 10 years ago • 1 comments

mfrederickson avatar Sep 14 '14 06:09 mfrederickson

I`ve made it like that:

<div class="salon_image" style="position:relative">
        <span class="btn upload-btn green" ng-click="pickPhoto()">Choose file</span>

        <image-crop data-width="625" data-height="416" data-shape="square" data-result="imageCropResult" data-step="imageCropStep">
        </image-crop>
    </div>

Styles:

.salon_image .upload-btn {    position: absolute;
        top: 50%;
        left: 50%;
        z-index: 10;
        width: 150px;
        text-align: center;
        margin-left: -75px;
        margin-top: -24px;}
    .salon_image .ng-image-crop input[type='file'] {
        width: 0px;
        height: 0px;
        overflow: hidden;}

Click event:

$scope.pickPhoto= function() { 
angular.element('.salon_image .image-crop-input').trigger('click');
return false;
};

awojtczyk avatar Sep 19 '15 15:09 awojtczyk