maximilianh / cellBrowser

main repo: https://github.com/ucscGenomeBrowser/cellBrowser/ - Python pipeline and Javascript scatter plot library for single-cell datasets, http://cellbrowser.rtfd.org
https://github.com/ucscGenomeBrowser/cellBrowser/
GNU General Public License v3.0
104 stars 40 forks source link

Fix open dataset for plain datasets, fix Esc closing for open dataset… #175

Closed mxposed closed 4 years ago

mxposed commented 4 years ago

… dialog

In out installation there's no openDsInfo.datasets field, so when I hit o I get this error in the console:

cellBrowser.js?01ccf2da80:786 Uncaught TypeError: Cannot read property 'length' of undefined
    at getBodyParts (cellBrowser.js?01ccf2da80:786)
    at openDatasetDialog (cellBrowser.js?01ccf2da80:937)
    at cellBrowser.js?01ccf2da80:4851
    at f (mousetrap.min.js?2d8a3d9435:5)
    at c.h._handleKey (mousetrap.min.js?2d8a3d9435:7)
    at c.handleKey (mousetrap.min.js?2d8a3d9435:10)
    at HTMLDocument.d (mousetrap.min.js?2d8a3d9435:5)

To fix that I skip this bodyParts thing if there's no such property.

The focus manipulations are to close Open dataset dialog with Esc—didn't work for me without this fix.