Skip to content

Commit 680971a

Browse files
authored
Merge pull request jbaysolutions#176 from rakam-io/master
Emit dimensions in pixel in resize event
2 parents 33c5205 + 93d0865 commit 680971a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -442,8 +442,8 @@ Working example [here](https://jbaysolutions.github.io/vue-grid-layout/examples/
442442
Every time an item is being resized and changes size
443443

444444
```javascript
445-
resizeEvent: function(i, newH, newW){
446-
console.log("RESIZE i=" + i + ", H=" + newH + ", W=" + newW);
445+
resizeEvent: function(i, newH, newW, newHPx, newWPx){
446+
console.log("RESIZE i=" + i + ", H=" + newH + ", W=" + newW + ", H(px)=" + newHPx + ", W(px)=" + newWPx);
447447
},
448448
```
449449

src/GridItem.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,7 @@
522522
this.lastH = y;
523523
524524
if (this.innerW !== pos.w || this.innerH !== pos.h) {
525-
this.$emit("resize", this.i, pos.h, pos.w);
525+
this.$emit("resize", this.i, pos.h, pos.w, newSize.height, newSize.width);
526526
}
527527
if (event.type === "resizeend" && (this.previousW !== this.innerW || this.previousH !== this.innerH)) {
528528
this.$emit("resized", this.i, pos.h, pos.w, newSize.height, newSize.width);

0 commit comments

Comments
 (0)