# 2D Slice/3D View interactions for Plot and Table views

**URL:** https://discourse.slicer.org/t/2d-slice-3d-view-interactions-for-plot-and-table-views/37317
**Category:** Development
**Tags:** plots
**Created:** [July 10, 2024, 9:41pm UTC](https://discourse.slicer.org/t/2d-slice-3d-view-interactions-for-plot-and-table-views/37317 "2024-07-10T21:41:21Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![jamesobutler](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jamesobutler/32/7511_2.png) [@jamesobutler](https://discourse.slicer.org/u/jamesobutler)
#### Post date: [July 10, 2024, 9:41pm UTC](https://discourse.slicer.org/t/2d-slice-3d-view-interactions-for-plot-and-table-views/37317/1 "2024-07-10T21:41:21Z")

</div>

Maximizing of views with a button in the view controller as well as right-click context menu and double-click actions were originally added in Slicer with the following commit:

> <https://github.com/Slicer/Slicer/commit/fdb836254de763efdca87a99377e3e5195d83e7e>
>
> Clicking "maximize" button in the header of the view controller makes the corres…ponding view maximized in the view layout. Clicking the button again restores the original view layout.
> 
> Shortcuts added to access this feature without leaving the view:
> \- double-click in an empty area in the view maximizes/restores a view
> \- "Maximize" / "Restore view layout" actions view context menu (right-clicking in an empty area)
> 
> Implementation: A new MaximizedViewNode node reference is added to vtkMRMLLayoutNode. If MaximizedViewNode is set to a valid view node then that view is displayed instead of the views defined by vtkMRMLLayoutNode::GetCurrentLayoutDescription(). The current layout ID or description in the layout node is not changed, the override happens at lower level, in qMRMLLayoutManager. The commit moves storage and observation of view nodes from various view controller widgets to the nodes into the parent qMRMLViewControllerBar to reduce code duplication.
> 
> fixes #1409
> 
> Co-authored-by: jahnavi0801 \<jahnavi0801@gmail.com\>

I have recently been doing more work using Plot (and table) views and found myself double-clicking to maximize a Plot view, but nothing happened. I could only maximize the plot using the button in the plot view controller.

Similarly there is no right-click context menu for a Plot view to do things possibly such as changing interaction mode, reset field of view, Copy image to clipboard (svg type like existing Plot export functionality).

Is there any considerations that might’ve avoided the development of double-click to maximize for Plot views and Table views? Tables would probably only have issue in that double-click in the table would try to edit the cell, but double clicking outside of the table cell area could potentially be for maximize/minimize of the table.

cc: @lassoan for thoughts on these interactions for Plot Views and Table Views as he was a core Slicer developer creating the functionality for the 2D Slice and 3D View interactions.

---

<div class="post-metadata">

### Author: ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)
#### Post date: [July 11, 2024, 2:15am UTC](https://discourse.slicer.org/t/2d-slice-3d-view-interactions-for-plot-and-table-views/37317/2 "2024-07-11T02:15:54Z")

</div>

I agree that it would be more consistent if double-click to maximized plot and table views as well (maybe table views only when the table is read-only), and some useful features could be added as context menu actions. There was no specific reason to avoid implementing these, we just moved on to work on other things.
