Skip to content

Commit

Permalink
Fix #110
Browse files Browse the repository at this point in the history
  • Loading branch information
kirillmurashov committed May 7, 2021
1 parent ebebc9d commit 4c8e8b3
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/components/vue-drag-resize.js
Original file line number Diff line number Diff line change
Expand Up @@ -397,8 +397,8 @@ export default {
};
},

stickDown(stick, ev) {
if (!this.isResizable || !this.active) {
stickDown(stick, ev, force = false) {
if ((!this.isResizable || !this.active) && !force) {
return;
}

Expand Down Expand Up @@ -444,7 +444,6 @@ export default {
let newBottom = dimensionsBeforeMove.bottom;
let newLeft = dimensionsBeforeMove.left;
let newRight = dimensionsBeforeMove.right;

switch(currentStick[0]) {
case 'b':
newBottom = dimensionsBeforeMove.bottom + delta.y;
Expand Down Expand Up @@ -793,7 +792,7 @@ export default {
const stick = 'mr';
const delta = oldVal - newVal;

this.stickDown(stick, { pageX: this.right, pageY: this.top + (this.height / 2) });
this.stickDown(stick, { pageX: this.right, pageY: this.top + (this.height / 2) }, true);
this.stickMove({ x: delta, y: 0 });

this.$nextTick(() => {
Expand All @@ -811,7 +810,7 @@ export default {
const stick = 'bm';
const delta = oldVal - newVal;

this.stickDown(stick, { pageX: this.left + (this.width / 2), pageY: this.bottom });
this.stickDown(stick, { pageX: this.left + (this.width / 2), pageY: this.bottom }, true);
this.stickMove({ x: 0, y: delta });

this.$nextTick(() => {
Expand Down

0 comments on commit 4c8e8b3

Please sign in to comment.