Comments (4)
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.
@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.
@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.
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.
@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)
- Startup.cs vs Program.cs and ActiveItem equals null HOT 2
- not working in newest chrome release HOT 2
- Blazor Server .NET 6 mobile drag n drop HOT 1
- Multiple Dropzone and Linq Items not work
- Doesn't work on mobile? OnItemDrop never triggers. HOT 4
- CSS grid support HOT 3
- .NET 6.0 Program.cs
- Doesn`t work with MAUI Blazor HOT 1
- inprogess / inprogress misspellings
- File drop possible?
- DropZone - when you incidentally start dragging dropzone caption down, after that dragging an item shows dragging all items HOT 1
- Cannot add new/remove items to list when one item was dragged from one list to another HOT 1
- [Question] OrderPossiton not Available ? HOT 6
- Support for handle
- How to use it with Virtualization?
- Stop drop if item belongs to another dynamically created dropzone of same type?
- Read the order position of list items
- [Question] Multiple drops of single item
- [Feature Request] Expose containing div HOT 1
- website with examples is stopped HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from blazor-dragdrop.