Skip to content

Commit 48be9eb

Browse files
committed
add updated event to GridLayout component
1 parent 12ab330 commit 48be9eb

File tree

4 files changed

+67
-53
lines changed

4 files changed

+67
-53
lines changed

dist/vue-grid-layout.js

Lines changed: 61 additions & 49 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/vue-grid-layout.min.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/vue-grid-layout.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/GridLayout.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,7 @@
236236
// needed because vue can't detect changes on array element properties
237237
this.eventBus.$emit("compact");
238238
this.updateHeight();
239+
if (eventName === 'dragend') this.$emit('updated', this.layout);
239240
},
240241
resizeEvent: function (eventName, id, x, y, h, w) {
241242
if (eventName === "resizestart" || eventName === "resizemove") {
@@ -265,6 +266,7 @@
265266
compact(this.layout, this.verticalCompact);
266267
this.eventBus.$emit("compact");
267268
this.updateHeight();
269+
if (eventName === 'resizeend') this.$emit('updated', this.layout);
268270
},
269271
},
270272
}

0 commit comments

Comments
 (0)