You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
How to show a custom visual param box and at the same time inherit data and selection param boxes #40
At the beginning, all panels in iSEEtree had only a visual param box that I created manually within the .defineInterface method. However, with this approach the parent .defineInterface method gets overwritten and the data and selection param boxes do not show up. Some related discussion is also available in this iSEEtree issue.
Solution
Using the ComplexHeatmapPlot as a template, I realised first I could call the parent method with callNextMethod, and then embed my custom visual box between data and selection boxes created by the parent method. This is done as follows, taken from here:
#' @importFrom methods callNextMethod
setMethod(".defineInterface", "RowTreePlot", function(x, se, select_info) {
out <- callNextMethod()
list(
out[1],
.create_visual_box_for_rowtree(x, se),
out[-1]
)
})
You also need to define a function that creates the visual box (in this case .create_visual_box_for_rowtree), as done here. And this returns all three standard param boxes in the correct order!
Activity
kevinrue commentedon May 1, 2024
Thanks for pinpointing a great example for this use case which I'll be happy to showcase in a chapter about writing new panels!