2
0
mirror of https://github.com/tenrok/vue-ganttastic.git synced 2026-06-18 19:00:34 +03:00

feat: drag limit on left

This commit is contained in:
yicone
2021-01-29 22:25:37 +08:00
parent e259224b2c
commit 4ef8f27f53
+5 -1
View File
@@ -1,4 +1,4 @@
<template>
<template>
<div>
<div
class="g-gantt-bar"
@@ -262,9 +262,13 @@ export default {
},
isPosOutOfDragRange(xStart, xEnd){
// 不能推动旁边的bar时,拖拽就不停止
if(!this.ganttChartProps.pushOnOverlap) {
return false
}
if(xStart && xStart < 0) {
return true
}
if(xStart && this.dragLimitLeft !== null && xStart < this.dragLimitLeft + this.getMinGapBetweenBars()){
return true
}