mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Minor cleanup, activate node after dragging only
This commit is contained in:
@@ -23,32 +23,18 @@ export default {
|
||||
type: Object,
|
||||
required: false,
|
||||
},
|
||||
zoom: {
|
||||
type: Number,
|
||||
default: 1,
|
||||
required: false,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
mouseDown: {},
|
||||
_localPosition: {},
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
draggableOptions() {
|
||||
return {
|
||||
defaultPosition: null,
|
||||
mouseDown: this.stopPropagation,
|
||||
};
|
||||
},
|
||||
localPosition() {
|
||||
if (this.position) {
|
||||
return this.position;
|
||||
} else {
|
||||
return this._localPosition;
|
||||
}
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
onDragStart(e) {
|
||||
@@ -59,6 +45,7 @@ export default {
|
||||
console.log("stopDragging");
|
||||
e.stopPropagation();
|
||||
this.$emit("stopDragging");
|
||||
this.$emit("mouseup");
|
||||
},
|
||||
stopPropagation(e) {
|
||||
e.stopPropagation();
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<draggable-wrapper
|
||||
:position="step.position || defaultPosition"
|
||||
@updatePosition="onUpdatePosition"
|
||||
@mousedown="makeActive"
|
||||
@mouseup="makeActive"
|
||||
@move="onMove"
|
||||
:id="idString"
|
||||
:name="name"
|
||||
|
||||
@@ -104,15 +104,6 @@ export default {
|
||||
onDragConnector(vector) {
|
||||
this.draggingConnection = vector;
|
||||
},
|
||||
handleMove(e) {
|
||||
// console.log(e);
|
||||
},
|
||||
handleUp(e) {
|
||||
console.log(e);
|
||||
},
|
||||
handleDown(e) {
|
||||
console.log(e);
|
||||
},
|
||||
onZoom(zoomLevel) {
|
||||
this.zoomLevel = zoomLevel;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user