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 f0eec97 commit e2da768
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 12 deletions.
9 changes: 2 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue-drag-resize",
"version": "2.0.2",
"version": "2.0.3",
"description": "Vue Component for resize and drag elements",
"author": "Kirill Murashov <me@kirillmurashov.com>",
"main": "dist/index.js",
Expand Down
8 changes: 4 additions & 4 deletions src/component/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 @@ -793,7 +793,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 +811,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 e2da768

Please sign in to comment.