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

Loading from state is not working correctly #187

Closed
EdwardMoyse opened this issue Dec 4, 2020 · 10 comments
Closed

Loading from state is not working correctly #187

EdwardMoyse opened this issue Dec 4, 2020 · 10 comments
Labels
bug Something isn't working

Comments

@EdwardMoyse
Copy link
Collaborator

I tried to add a default configuration for ATLAS, but it isn't working correctly:
https://github.com/EdwardMoyse/phoenix/blob/add-atlas-default-config/packages/phoenix-ng/projects/phoenix-app/src/app/sections/atlas/atlas.component.ts#L74

specifically, some jet collections should be disabled, and the pixel and SCT hits should be different colours to red.

When you choose 'Load State' from the menu, then it works as expected.

@EdwardMoyse EdwardMoyse added the bug Something isn't working label Dec 4, 2020
@9inpachi
Copy link
Collaborator

9inpachi commented Dec 4, 2020

Yup, expected.

You have to make ngOnInit async and await for the geometry loading functions. See FASER code.

EdwardMoyse added a commit to EdwardMoyse/phoenix that referenced this issue Dec 4, 2020
@EdwardMoyse
Copy link
Collaborator Author

Ah ha! Thanks! However there is still a problem - the menu items state are not updated - for example, two Jet collections should be disabled here:
image

@9inpachi
Copy link
Collaborator

9inpachi commented Dec 4, 2020

Does this new bug work fine with loading state from the menu?

@9inpachi
Copy link
Collaborator

9inpachi commented Dec 4, 2020

I forgot to put it earlier, but we could also load state from code after all the loading is done (see here).

@EdwardMoyse
Copy link
Collaborator Author

Does this new bug work fine with loading state from the menu?

No. Same issue when loading state from the menu. I like the idea of doing it once loading is done though!

@9inpachi
Copy link
Collaborator

9inpachi commented Dec 4, 2020

No. Same issue when loading state from the menu

Ok, then I will have to look into the export and import state functions. I will give news tonight maybe.

@9inpachi
Copy link
Collaborator

9inpachi commented Dec 4, 2020

No. Same issue when loading state from the menu. I like the idea of doing it once loading is done though!

Indeed. The loading manager is pretty cool I think.

@9inpachi
Copy link
Collaborator

9inpachi commented Dec 4, 2020

So @EdwardMoyse,

The file you exported is wrong / you missed something.

For the file https://github.com/EdwardMoyse/phoenix/blob/add-atlas-default-config/packages/phoenix-ng/projects/phoenix-app/src/assets/files/config/atlas-config.json
If you search for Anti to see the configuration for the Jet collections, you will see that the toggleState is true for all so it's expected that they will show.

I tried exporting to see if it's a problem with export but my export works fine and I can also import the same exported file with disabled / hidden Jets collections without a problem.

So just disable the collections, export again and replace the file in assets.

@9inpachi
Copy link
Collaborator

9inpachi commented Dec 4, 2020

From #188

image

EdwardMoyse added a commit to EdwardMoyse/phoenix that referenced this issue Dec 5, 2020
EdwardMoyse added a commit to EdwardMoyse/phoenix that referenced this issue Dec 5, 2020
@EdwardMoyse
Copy link
Collaborator Author

Whoops - you were right ... however in my local tests I was using a file with the correct configuration (not for the final check of loading from the menu, obviously!).

For reasons I don't quite understand, using the loading Manager fixes it! So I think this can be closed now.

9inpachi pushed a commit that referenced this issue Jul 28, 2022
9inpachi pushed a commit that referenced this issue Jul 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants