ngx-file-drop icon indicating copy to clipboard operation
ngx-file-drop copied to clipboard

Bigger screen drop zone position misplace

Open krunalpanteon opened this issue 4 years ago • 1 comments

  • In small screen drop zone have proper position. look into below image small-screen-drop

  • In large screen drop zone misplace look into below 2 images large-screen-drop-1 large-screen-drop-2 Anyone have solution ?

krunalpanteon avatar Aug 19 '21 07:08 krunalpanteon

The trick is to override sizes. Here is what I came with for my page scss:

:host ::ng-deep {
    .ngx-file-drop__drop-zone{       
        height: auto !important;
        min-width: 20px !important;
        padding: 2px !important;
    }
    .ngx-file-drop__content{
        //height: 200px !important;
        height: auto !important;
        min-height: 20px !important;
        min-width: 20px !important;
    }
}

I additionally have custom content. Here is it in case styling doesn't work for default content:

<ngx-file-drop  (onFileDrop)="dropped($event)">
    <ng-template ngx-file-drop-content-tmp let-openFileSelector="openFileSelector">                                   
        <div  class="flex" style="height: 110px; width: 110px;"  (click)="openFileSelector()">
            <div  class="flex" style="padding: 2px;" >Your Logo *</div>
        </div>
    </ng-template>
</ngx-file-drop>

alehro avatar Jan 29 '24 14:01 alehro