vitessce-python
vitessce-python copied to clipboard
Adjust grid layout columns to prevent float values for x,y,w,h
In addition, the following code returns an error message.
vc.layout((umap | pca | cell_sets | genes) / heatmap);
Config validation failed
[
{
"keyword": "type",
"dataPath": ".layout[0].w",
"schemaPath": "#/definitions/components/items/properties/w/type",
"params": {
"type": "integer"
},
"message": "should be integer"
}
]
I guess this is because the w value in react-grid-layout is accepting only integer values by a JSON schema, and adding many columns results the width less than 1.0. (1) I think the error message can be more understandable to users, or (2) allow double values (Although only the integer values are said to be officially allowed by react-grid-layout, I think double values work fine as well?).
Originally posted by @sehilyi in https://github.com/vitessce/vitessce-python/issues/34#issuecomment-754834382
We should either do this adjustment automatically on the JS side and allow floats in the view config, or do the adjustment on the Python side and add a field layoutCols which sets cols of react-grid-layout https://github.com/STRML/react-grid-layout#grid-layout-props to something other than 12