When adding windows to mirador, they are displayed in a mosaic of increasingly small images. For example here with three windows.
The windows are draggable and resizable, but I would like to have directly this sort of display:
In mirador 2 I have seen a slotAddress
option. Is there a way to do that as well with mirador 3?
This is an example with three images but there could be up to 6 or 7, I don't know that in advance.
EDIT I have found an example here where the workspace layout is customized. I would have to adapt it depending on the actual number of windows. Where do the first/second options come from? Does it need to be a combination of first and second? Can I had 'third' or 'fourth' for instance?? Any help welcome!
workspace: {
layout: {
direction: "row",
first: {
first: "a",
second: "d",
direction: "column"
},
second: {
first: {
first: "b",
second: "e",
direction: "column"
},
second: {
first: "c",
second: "f",
direction: "column"
},
direction: "row"
},
splitPercentage: 33.33
}
}
The Mirador 3 layout is a binary tree data structure, allowing for a powerful way to customize the layout.
first
andsecond
just references to the nodes in the branch of the tree, and the ordering implied byfirst
/second
is used with the split percentage.These types are defined upstream in https://github.com/nomcopter/react-mosaic/blob/master/src/types.ts#L12
There is no concept of
third
/fourth
here. To achieve the layout you are looking for you would want to represent the the equal column widths as a binary tree structure like this:Example 6 columns