informatics-isi-edu / deriva-webapps

Deriva-based web applications
Apache License 2.0
2 stars 1 forks source link

Max width and height configuration parameters #176

Closed jrchudy closed 2 months ago

jrchudy commented 10 months ago

Currently on rbk/gudmap/atlas we have 2 configurations per consortium (6 total) that are nearly identical (*-data-summary and *-data-summary-responsive). The only difference is that the height and width of the plot are defined in the non responsive configurations. Our code then fixes the height and width of the plot container.

When the height and width are not defined, the plot container instead uses the following height and width:

width = 0.95 * containerWidth (app_width proposed in another issue to modify this 0.95)
height = 0.7 * containerHeight

In this case, the max width and height seems to be set appropriately for responsive plots. We should allow for these 2 properties to be defined in the plot-config document. We will add them at the first level of the document alongside plots since these properties will affect the height and width of the container that the plots are contained in (to resize properly to the "viewport" of the plot, whether it's standalone or in an iframe).

var plotConfigs = {
  "config-name": {
    headTitle: "...",
    max_app_height:    Max height of the container surrounding the plots
    max_app_width:     Max width of the container surrounding the plots
    plots: [ ... ]
  }
}
jrchudy commented 4 months ago

More info in issue #163.