phphe / vue-draggable-nested-tree

Vue2 draggable tree component
https://hetree.phphe.com/
MIT License
344 stars 62 forks source link

Can we clone the drag element to have full control over its styling without any opacity applied #33

Open shaydoc opened 5 years ago

shaydoc commented 5 years ago

The Drag Element by standard has an opacity, can we fake this element by creating a real dom element by cloning the drag element and that way we have full control over style..

https://stackoverflow.com/questions/9712535/html5-drag-and-drop-no-transparency

phphe commented 5 years ago

vue-draggable-nested-tree doon't use html5 drag. it just moves the element by 'position: absolute'. the dragging node element '.tree-node' has a class 'dragging'. you can custom its style by define the class

shaydoc commented 5 years ago

@phphe i am trying figure out where/how i can override opacity set here: https://github.com/phphe/draggable-helper/blob/dc3064df169907c54b63d563df324c5adf2f1542/src/index.js#L80

any tips ?

phphe commented 5 years ago

the dragging node has a class 'dragging', so you can add css

.tree-node.dragging{
  opacity: 1!important;
}