gbv / jskos-vue

A suite of components and plugins for Vue 3 related to JSKOS.
https://gbv.github.io/jskos-vue/
MIT License
0 stars 1 forks source link

Add drag and drop support for concepts and schemes #5

Closed stefandesu closed 3 years ago

stefandesu commented 3 years ago

We should implement a plugin that makes it easy to add drag and drop of concepts and schemes between components. Several components in jskos-vue could add this, either as a source for dragging (ItemName, rows in ItemList), or as a drop target (ItemDetails).

The plugin implementation can be adjusted to Vue 3 from Cocoda's drag and drop mixin.

stefandesu commented 3 years ago

In Cocoda, in addition to saving the dragged concept object, we added the URI as text data to the drag event:

event.dataTransfer.setData("text", concept.uri)

However, I'm not sure why this was needed, so I didn't add it for the implementation here. Posting this comment in case there's a bug when using this in production because this might be related.