Skip to content

Commit beb01ba

Browse files
committed
testing with vue-dragula and interact.js
1 parent e551007 commit beb01ba

File tree

7 files changed

+93
-608
lines changed

7 files changed

+93
-608
lines changed

examples/app.css

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@
2222

2323

2424
/******* DRAG AND DROP *******/
25-
26-
/*
2725
.gu-mirror {
2826
position: fixed !important;
2927
margin: 0 !important;
@@ -46,43 +44,3 @@
4644
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=20)";
4745
filter: alpha(opacity=20);
4846
}
49-
*/
50-
/*
51-
* note that styling gu-mirror directly is a bad practice because it's too generic.
52-
* you're better off giving the draggable elements a unique class and styling that directly!
53-
*/
54-
/*
55-
.container div,
56-
.gu-mirror {
57-
!*padding: 10px;*!
58-
background-color: rgba(0, 0, 0, 0.2);
59-
transition: opacity 0.4s ease-in-out;
60-
}
61-
.container div {
62-
cursor: move;
63-
cursor: grab;
64-
cursor: -moz-grab;
65-
cursor: -webkit-grab;
66-
!*margin-bottom: 10px;*!
67-
}
68-
.container div:last-child {
69-
!*margin-bottom: 0;*!
70-
}
71-
.gu-mirror {
72-
cursor: grabbing;
73-
cursor: -moz-grabbing;
74-
cursor: -webkit-grabbing;
75-
}
76-
.container .ex-moved {
77-
background-color: #e74c3c;
78-
}
79-
.container.ex-over {
80-
background-color: rgba(255, 255, 255, 0.3);
81-
}
82-
.handle {
83-
!*padding: 0 5px;*!
84-
!*margin-right: 5px;*!
85-
background-color: rgba(0, 0, 0, 0.4);
86-
cursor: move;
87-
}
88-
*/

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ <h1>Vue Grid Layout</h1>
4545
<button @click="removeItem(item)">REMOVE {{item.i}}</button>
4646
</grid-item>
4747
</responsive-grid-layout>-->
48-
<grid-layout :layout.sync="layout" :col-num="12" :row-height="30" :is-draggable="true" :vertical-compact="true">
48+
<grid-layout :layout.sync="layout" :col-num="12" :is-draggable="true">
4949
<grid-item v-for="item in layout"
5050
:x.sync="item.x"
5151
:y.sync="item.y"

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@
4242
"vue-html-loader": "^1.2.2",
4343
"vue-style-loader": "^1.0.0",
4444
"vue-loader": "^8.5.2",
45+
"vue-dragula": "^1.0.4",
46+
"interact.js": "^1.2.6",
4547
"lodash": "^4.13.1",
4648
"element-resize-detector": "^1.1.3",
4749
"webpack": "^1.13.1",

0 commit comments

Comments
 (0)