cinera_search_pre.js: Compute grid on view toggle
This commit is contained in:
parent
f519a0977f
commit
e7d70ccb3a
|
@ -3472,6 +3472,27 @@ ToggleView()
|
|||
}
|
||||
else
|
||||
{
|
||||
CineraProps.Orientation = GetRealOrientation(orientations.LANDSCAPE_LEFT, CineraProps.IsMobile);
|
||||
if(CineraProps.IsMobile)
|
||||
{
|
||||
UseOrientation(CineraProps.Orientation);
|
||||
}
|
||||
var NewGridSize = ComputeOptimalGridSize();
|
||||
if(Nav.GridSize !== NewGridSize)
|
||||
{
|
||||
UnbindGridKeys();
|
||||
Nav.GridSize = NewGridSize;
|
||||
ReinitButtons();
|
||||
BindGridKeys();
|
||||
SetHelpKeyAvailability(Nav.GridSize)
|
||||
if(GridSizeIsSupported(Nav.GridSize))
|
||||
{
|
||||
var TargetLevel = Nav.TraversalStack[Nav.TraversalStack.length - 1];
|
||||
var ProjectsStack = EmptyTraversalStackIntoProjectsStack();
|
||||
DeriveTraversalStack(ProjectsStack, TargetLevel);
|
||||
}
|
||||
}
|
||||
|
||||
if(GridSizeIsSupported(Nav.GridSize))
|
||||
{
|
||||
Nav.Controls.View.textContent = "View: Grid";
|
||||
|
@ -3834,6 +3855,7 @@ ResizeFunction()
|
|||
}
|
||||
UpdateButtons();
|
||||
}
|
||||
|
||||
function
|
||||
InitResizeEventListener()
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue