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

Mio is not showing the section images according to section number #14

Open
Majpuc opened this issue Sep 1, 2022 · 5 comments
Open

Mio is not showing the section images according to section number #14

Majpuc opened this issue Sep 1, 2022 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@Majpuc
Copy link
Member

Majpuc commented Sep 1, 2022

Hi,

We are preparing Mio (and later LZ links) where several series are mixed. We thought Mio would display the order according to the section numbers but apparently not: https://miosdv.apps-dev.hbp.eu/index.html?bucket=https://data-proxy.ebrains.eu/api/v1/public/buckets/img-439ccbe7-c645-11ec-b100-00090faa0001&collectionMode=true&limit=200

Could you change some settings so it can follow the section numbers? or is it possible only in LZ?

@Majpuc Majpuc added the bug Something isn't working label Sep 1, 2022
@darwinjob
Copy link
Contributor

darwinjob commented Sep 1, 2022

Noo, it’s only possible in LZ. Just kidding :)
Will sorting the file names alphabetically do the thing? Or you need something more advanced?

@Tevemadar Tevemadar removed their assignment Sep 1, 2022
@Majpuc
Copy link
Member Author

Majpuc commented Sep 1, 2022

Good! I am not sure an alphabetic sorting will help. It would be good if it is able to recognize the file naming convention: s_xxx

@darwinjob
Copy link
Contributor

OK. Since LZ is the gold standard :) for sorting @Tevemadar do you sort them alphabetically?

@Tevemadar
Copy link
Member

I sort by the section numbers. While probably it's done in a complicated way, if I wrote the code today, I would simply take the _sxxx... part, and sort that alphabetically. This way the lettered sub-images would be sorted too.
Something like

let sections=[{name:"WhateverElse_s123b"},
              {name:"Whatever_s124_timm"},
              {name:"WhateverElse_s123a_CO2"},
              {name:"WhateverElse_s123c_bda"}];
sections.sort((a,b)=>a.name.match(/(_s\d+.*)/)[0].localeCompare(b.name.match(/(_s\d+.*)/)[0]));
console.log(JSON.stringify(sections));
[{"name":"WhateverElse_s123a_CO2"},{"name":"WhateverElse_s123b"},{"name":"WhateverElse_s123c_bda"},{"name":"Whatever_s124_timm"}]

@Majpuc
Copy link
Member Author

Majpuc commented Feb 1, 2023

Hi @darwinjob
What is the status here?

@Tevemadar Tevemadar transferred this issue from Neural-Systems-at-UIO/LegacyIssueTracker Feb 20, 2023
@Tevemadar Tevemadar transferred this issue from Neural-Systems-at-UIO/Limbo Feb 20, 2023
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

3 participants