Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

Commit

Permalink
added changelog & PR fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
lookacat committed Nov 3, 2021
1 parent ad04922 commit 4d2f731
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
7 changes: 7 additions & 0 deletions changelog/unreleased/enhancement-add-drag-drop-ghost
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Enhancement: Add Ghost Element for Drag & Drop

We've added a custom ghost element for the drag&drop functionality in the OcTableFiles to
better visualize the action to the user.

https://github.com/owncloud/web/issues/5788
https://github.com/owncloud/owncloud-design-system/pull/1754
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
</template>

<script>
/**
* Please head to the OcTableFiles component (https://owncloud.design/#/oC%20Components/OcTableFiles) for a demo of the Ghost Element.
*/
export default {
name: "GhostElement",
props: {
Expand Down Expand Up @@ -52,7 +56,3 @@ export default {
}
}
</style>

<docs>

</docs>
4 changes: 1 addition & 3 deletions src/components/molecules/OcTable/OcTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ export default {
event.target.style.cursor = "move"
},
setGhostElement(file, event) {
const selection = this.selection
const selection = [...this.selection]
selection.splice(
selection.findIndex(function (i) {
return i.id === file.id
Expand Down Expand Up @@ -292,8 +292,6 @@ export default {
const dropTarget = event.target
const dropTargetTr = dropTarget.closest("tr")
const dropFileId = dropTargetTr.dataset.fileId
event.target.style.cursor = "default"
this.dropRowStyling(id, true, event)
this.$emit(EVENT_FILE_DROPPED, dropFileId)
},
Expand Down

0 comments on commit 4d2f731

Please sign in to comment.