Giter VIP home page Giter VIP logo

Comments (4)

Postlagerkarte avatar Postlagerkarte commented on September 1, 2024

Use a custom style for this:

<Dropzone Style="DragDropStyle.Custom">

and add to you site.css e.g.:

 .plk-dd-spacing {
    height: 10px;
}

 .plk-dd-spacing-dragged-over {
    padding: 25px;
}

.plk-dd-dragged-over  {
    background-color: lightgray;
    opacity: 0.6;
    animation: blinker 1s linear infinite;
}

 .plk-dd-dragged-over > div {
    background-color: lightgray;
    opacity: 0.6;
    animation: blinker 1s linear infinite;
}

.blink_me {
    animation: blinker 1s linear infinite;
}

 .plk-dd-in-transit {
    opacity: 0
}

.plk-dd-in-transit > div {
    opacity: 0
}

from blazor-dragdrop.

michelkommers avatar michelkommers commented on September 1, 2024

@Postlagerkarte I tryed this initially, but the style from the in-transit apply to both 'visual elements', the div that stays on original place and the one dragged.

see this post as a reference: https://stackoverflow.com/a/62790549/1546943

The key point is to listening to the drag event, instead of the dragstart.

PS; im asking for this cause for the user, sounds more 'natural' to see the original element disapear while dragging.

from blazor-dragdrop.

Postlagerkarte avatar Postlagerkarte commented on September 1, 2024

@michelkommers thank you for contributing!

I just tried with the custom style from above and it looks like the original element is getting the zero opacity while the dragged element is not.

opacity

You can see it more clearly if you use

.plk-dd-in-transit {
border: 5px solid red;
}

.plk-dd-in-transit > div {
border: 5px solid red;
}

I agree that it looks more 'natural' to see the original element disapear while dragging.

from blazor-dragdrop.

michelkommers avatar michelkommers commented on September 1, 2024

@Postlagerkarte thanks for the reply.

Here is applying to both, i will look in to my code, maybe something is conflicting, dont no.
Thanks

from blazor-dragdrop.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.