Skip to content
Snippets Groups Projects
Commit 7e554590 authored by Adam Procter's avatar Adam Procter
Browse files

adding drag

parent faa1a458
Branches
No related tags found
No related merge requests found
<template>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 10000" ref="myref">
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 1000 1000"
width="450px"
ref="myref"
>
<g class="draggable-group" v-for="(nodes, index) in myArray" :key="index">
<rect width="150" height="200" style="fill: rgb(255, 0, 100)" />
<foreignObject id="x" x="10" width="131" height="100">
......@@ -77,7 +82,7 @@ export default {
},
}
// PLAIN JS should be a mixin
// THIS IS PLAIN JS should be a mixin
function makeDraggable(svg) {
// var svg = evt.target
......@@ -142,9 +147,9 @@ function makeDraggable(svg) {
</script>
<style scoped>
.draggable,
.draggable-group {
cursor: move;
max-width: 150px;
}
.static {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment