Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with 'no-overlap' and 'push-on-overlap' functionalities #108

Open
jgurnett opened this issue Apr 12, 2024 · 12 comments
Open

Issue with 'no-overlap' and 'push-on-overlap' functionalities #108

jgurnett opened this issue Apr 12, 2024 · 12 comments

Comments

@jgurnett
Copy link

Currently I am unable to implement no-overlap, when I do it throws this console error and the bars overlap

Uncaught TypeError: D.isBetween is not a function
    at @infectoone_vue-ganttastic.js?v=80fab204:1154:20
    at Proxy.find (<anonymous>)
    at g (@infectoone_vue-ganttastic.js?v=80fab204:1150:28)
    at @infectoone_vue-ganttastic.js?v=80fab204:1197:33
    at Map.forEach (<anonymous>)
    at B (@infectoone_vue-ganttastic.js?v=80fab204:1196:7)
    at v (@infectoone_vue-ganttastic.js?v=80fab204:1181:5)
    at v (@infectoone_vue-ganttastic.js?v=80fab204:1088:141)

I am dynamically creating my rows and my data looks something like this

workers = [{
    name: "workerName",
    events: [
        {
             myBeginDate: "2024-04-12 13:00",
             myEndDate: "2022-04-12 13:00",
             ganttBarConfig: {
                 id: "eventId",
                label: "eventTitle",
             },
        },
    ]
}]

here is my vue 3 code

  <g-gantt-chart
    :chart-start="startDate"
    :chart-end="endDate"
    :precision="selectedPrecision"
    no-overlap
    bar-start="startDate"
    bar-end="endDate"
    @dblclick-bar="doubleClickBar"
    @dragend-bar="handleDragEnd"
  >
    <g-gantt-row
      v-for="(worker, index) in workers"
      :key="index"
      :label="worker.name"
      :bars="worker.events"
      :highlight-on-hover="true"
    />
</g-gantt-chart>

Any insight why this is happening?

@duoyeyasuo
Copy link

I also encountered this problem, please ask the author do you have a solution

@duoyeyasuo
Copy link

This is a very good plugin, I hope you can make more and more powerful

@Pedrocanoas
Copy link
Contributor

Pedrocanoas commented May 2, 2024

I've tried to reproduce your bug, but I couldn't. Can you share some more explain?

@jgurnett
Copy link
Author

jgurnett commented May 7, 2024

I am using

  • node 20.12.1
  • nuxt 3.6.3

@duoyeyasuo
Copy link

I am using
node 18.12.1

@duoyeyasuo
Copy link

An error occurred when I set no overlay

@duoyeyasuo
Copy link

Uncaught TypeError: D.isBetween is not a function
at @infectoone_vue-ganttastic.js?v=80fab204:1154:20
at Proxy.find ()
at g (@infectoone_vue-ganttastic.js?v=80fab204:1150:28)
at @infectoone_vue-ganttastic.js?v=80fab204:1197:33
at Map.forEach ()
at B (@infectoone_vue-ganttastic.js?v=80fab204:1196:7)
at v (@infectoone_vue-ganttastic.js?v=80fab204:1181:5)
at v (@infectoone_vue-ganttastic.js?v=80fab204:1088:141)

@duoyeyasuo
Copy link

I hope you can help me solve it

@Pedrocanoas
Copy link
Contributor

I still haven't been able to reproduce the bug, even though I've tried. but let's give it a try...

Did you check the startDate/endDate of the bar? because the isBetween function located in useBarDragManagement requires the start and end dates of the bar

Another possibility, have you been checked de format date?

If it's still continue, can you run this repo and tried the same values in playground

@duoyeyasuo
Copy link

What to do if both drag and double-click events are triggered simultaneously

@duoyeyasuo
Copy link

I wouldn't have had this problem before, using the problems that occurred with Node16.20 and Vue Ganttastic 2.3.2

@duoyeyasuo
Copy link

I still haven't been able to reproduce the bug, even though I've tried. but let's give it a try...

Did you check the startDate/endDate of the bar? because the isBetween function located in useBarDragManagement requires the start and end dates of the bar

Another possibility, have you been checked de format date?

If it's still continue, can you run this repo and tried the same values in playground

Although my problem has not been solved yet, thank you very much

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants