| Products | Versions |
|---|---|
| TIBCO LiveView Web | 1.3, 1.4 |
Some cards, such as a single row Grid, leave too much unused space inside the card. Is there a way to further reduce the height of a card to more closely match its contents?
lv-web/
plugins/
com.tibco.sb.ldm.web.plugins.cards/
com.tibco.sb.ldm.web.plugins.cards.js
META-INF/
plugin.json
{
"name": "com.tibco.sb.ldm.web.plugins.cards.height",
"module": {
"core": [
"com.tibco.sb.ldm.web.plugins.cards.js"
]
},
"staticContents": [],
"dependencies": []
}
/**
* Created by mtunpech on 10/03/17
*/
;(function(angular) {
'use strict';
angular
.module('com.tibco.sb.ldm.web.plugins.cards.height', ['com.tibco.sb.ldm'])
.run(onModuleRun);
onModuleRun.$inject = ['DashboardConfiguration'];
function onModuleRun(DashboardConfiguration) {
DashboardConfiguration.overrideSettings({
defaultPageLayoutConfig: {
// columns: 6, // the width of the grid, in columns
// pushing: true, // whether to push other items out of the way on move or resize
// swapping: true, // whether or not to have items of the same size switch places instead of pushing down if they are the same size
// width: 'auto', // can be an integer or 'auto'. 'auto' scales gridster to be the full width of its containing element
// colWidth: 50, // can be an integer or 'auto'. 'auto' uses the pixel width of the element divided by 'columns'
// margins: [10, 10], // the pixel distance between each widget
// outerMargin: false, // whether margins apply to outer edges of the grid
// minColumns: 6, // the minimum columns the grid must have
rowHeight: 25, // can be an integer or 'match'. Match uses the colWidth, giving you square widgets.
minSizeY: 2, // minimum row height of an item
minRows: 2, // the minimum height of the grid, in rows
// maxRows: 20, // the maximum height of the grid, in rows
// defaultSizeX: 2, // the default width of a gridster item, if not specified
defaultSizeY: 4, // the default height of a gridster item, if not specified
// minSizeX: 1, // minimum row height of an item
// minSizeY: 1, // maximum row height of an item
}
});
}
}(angular));