Skip to content

Commit 38776e5

Browse files
committed
1 parent 8437b7b commit 38776e5

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/App.vue

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
@moved="moved"
4747
>
4848
<test-element :text="item.i"></test-element>
49+
<!--<button @click="clicked">CLICK ME!</button>-->
4950
</grid-item>
5051
</grid-layout>
5152
</div>
@@ -104,6 +105,9 @@
104105
this.index = this.layout.length;
105106
},
106107
methods: {
108+
clicked: function() {
109+
window.alert("CLICK!");
110+
},
107111
increaseWidth: function(item) {
108112
var width = document.getElementById("content").offsetWidth;
109113
width += 20;

src/GridItem.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@
235235
isDraggable: function() {
236236
var self = this;
237237
if (this.interactObj == null) {
238-
this.interactObj = interact(this.$refs.item);
238+
this.interactObj = interact(this.$refs.item, {ignoreFrom: "a, button"});
239239
}
240240
if (this.isDraggable) {
241241
this.interactObj.draggable({});
@@ -254,7 +254,7 @@
254254
isResizable: function() {
255255
var self = this;
256256
if (this.interactObj == null) {
257-
this.interactObj = interact(this.$refs.item);
257+
this.interactObj = interact(this.$refs.item, {ignoreFrom: "a, button"});
258258
}
259259
if (this.isResizable) {
260260
this.interactObj

0 commit comments

Comments
 (0)