-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Timeline - Uncaught TypeError: Cannot read property 'height' of undefined #2594
Comments
I'm receiving possibly related errors after upgrading from 4.17.0 to 4.18.0. Needed to downgrade back to 4.17.0.
|
Looking at the subgroups example I can not reproduce this, by tracking any item to another group. |
I will try to provide you a jsbin soon |
It will be a bit difficult for me to do because I am using Vis commercially. It may take a while. |
@blin4444 did you receive my emails? Thanks. |
Sorry I can not share the whole code and it is very difficult to reproduce this bug for now because I have to finish the project soon. For now I just add some try/catch to prevent the error when I drag an item between groups and the script failed to calculate height of subgroup (probably because the subgroup has been removed dynamically in my code) I updated to 4.18.1 and the same error occurs in line 25320 when I tried to show/hide groups depending on the showed items ( based on this code: http://jsfiddle.net/zwwspLnz/ ). Like the old version, the error appears when the script tries to calculate the subgroup. The line in vis.js is : But this time it occurs during the dynamic load. I think I will try another way to hide groups. |
Hello everyone, I believe I've encountered the same problem as you, but in a different use case. I'm currently using the VIS timeline to generate a timeline with groups and subgroups of events. Basically, the thing is that from time to time I need to remove events from the subgroups and rearrange the subgroups consistently For instance, if I have the following setting:
And I remove the Event B, the following result is expected:
as opposed to:
I'm handling myself the update of the subgroups, but it seems that VIS isn't handling well the update of events, removing and re-adding subgroups and failing sometimes in re-adding deleted groups. The following example demonstrates the problem. You will be able to see the error logs in the console: In addition to failing on the re-calculation of the height (it seems to have removed a group and not re-added it), for some reason, after the second click, the events in the second row (subgroup 1) get moved to the last row (subgroup 8). Thank you very much for your help! |
Add method to change the subgroup an item is in. No longer decrement subgroup ID when removing a subgroup. Fixes almende#2594
@jtissier @santacruzd7 @blin4444 can you please test the pull request #2821 and check if this solves your problems? |
Dear @Tooa, I've tested the pull request and it solved my issue. Thank you very much :) |
@Tooa, I've tried the pull request and now I get the following error from vis.js line 29767: |
* Add methods to remove and add items to a subgroup. Add method to change the subgroup an item is in. No longer decrement subgroup ID when removing a subgroup. Fixes #2594 * Moved the orderSubgroups call outside of the add/remove methods. Added the ability to call the add/remove methods without a subgroupId parameter (takes from item data instead).
@blin4444 please open a new issue with a jsbin of your example |
Hi all,
First I want to say how much I love vis.js library, it saved me months of time to developp a timeline like yours.
I got an error Error on visjs 4.16.1 and 4.18.0 when i try to move a subgrouped item in another group :
If I catch this error I got another one on line 22179 and when I catch the second (in a console.warn) all looks good.
How can i fix it ?
The text was updated successfully, but these errors were encountered: