Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bigger screen drop zone position misplace #239

Open
krunalpanteon opened this issue Aug 19, 2021 · 1 comment
Open

Bigger screen drop zone position misplace #239

krunalpanteon opened this issue Aug 19, 2021 · 1 comment

Comments

@krunalpanteon
Copy link

krunalpanteon commented Aug 19, 2021

  • 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 ?

@alehro
Copy link

alehro commented Jan 29, 2024

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>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants