Skip to content
Snippets Groups Projects

Resolve "Implement basic functionality"

Merged Julian requested to merge 1-implement-basic-functionality into main
Compare and Show latest version
2 files
+ 14
4
Compare changes
  • Side-by-side
  • Inline
Files
2
+ 3
0
@@ -17,6 +17,7 @@ export default {
handleDragStart(event) {
if (this.isDisabled) return;
this.$refs.wrapper.style.cursor = "grabbing";
let rect = event.target.getBoundingClientRect();
event.dataTransfer.setData(
"vueDrag/gridItem",
JSON.stringify({
@@ -28,6 +29,8 @@ export default {
data: this.data,
context: this.context,
originGridId: this.gridId,
mouseX: event.clientX - rect.x - rect.width / (2 * this.w), // relative to center of the top left square
mouseY: event.clientY - rect.y - rect.height / (2 * this.h),
})
);
},
Loading