mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-21 13:50:20 +08:00
setDraggingHistoryItem on drag start and end events
This commit is contained in:
@@ -96,6 +96,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapActions } from "vuex";
|
||||
import { StatelessTags } from "components/Tags";
|
||||
import { STATES, HIERARCHICAL_COLLECTION_JOB_STATES } from "./model/states";
|
||||
import CollectionDescription from "./Collection/CollectionDescription";
|
||||
@@ -195,6 +196,7 @@ export default {
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
...mapActions("history", ["setDraggingHistoryItem"]),
|
||||
onClick() {
|
||||
if (this.isDataset) {
|
||||
this.$emit("update:expand-dataset", !this.expandDataset);
|
||||
@@ -206,10 +208,14 @@ export default {
|
||||
this.$router.push(this.itemUrls.display, this.name);
|
||||
},
|
||||
onDragStart(evt) {
|
||||
this.setDraggingHistoryItem(this.item);
|
||||
evt.dataTransfer.dropEffect = "move";
|
||||
evt.dataTransfer.effectAllowed = "move";
|
||||
evt.dataTransfer.setData("text", JSON.stringify([this.item]));
|
||||
},
|
||||
onDragEnd() {
|
||||
this.setDraggingHistoryItem(null);
|
||||
},
|
||||
onEdit() {
|
||||
this.$router.push(this.itemUrls.edit);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user