-
Notifications
You must be signed in to change notification settings - Fork 64
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
Remove type any
from return value of getContainingView, getSession
#3959
Conversation
I also tried to move towards using focusedViewId rather than focusedView in some places This PR originally was started because embedded code was calling setFocusedViewId when selecting a feature, but this was a crash on embedded Technically embedded should probably say it is 'always focused' to enable embedded to have keyboard shortcuts but thats not done here yet |
/** | ||
* #action | ||
*/ | ||
activateConfigurationUI() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
appeared unused, I think the behavior is wrong also (getting return value of editTrackConfiguration and then hiding/showing...)
@@ -1141,6 +1141,7 @@ export function getTickDisplayStr(totalBp: number, bpPerPx: number) { | |||
} | |||
|
|||
export function getViewParams(model: IAnyStateTreeNode, exportSVG?: boolean) { | |||
// @ts-expect-error |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should probably move to @jbrowse/plugin-linear-genome-view
isSessionModelWithWidgets(session) | ||
) { | ||
confs.forEach(c => session.addTrackConf(c)) | ||
confs.forEach(c => model.view.showTrack(c.trackId)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there was a bug here where I think it wanted to showTrack(c.trackId) but instead it was just forEach c=>c.trackId
Currently the objects returned by getSession, getContainingView, and others are essentially type
any
because they are e.g. an AbstractSessionModel & IAnyStateTreeModelBy mixing (&'ing) with IAnyStateTreeModel, the whole thing is
any
This removes the & IAnyStateTreeModel, and then cleans up some usage of these functions in the code including type guards, adding more stuff to the abstract model, etc.