Compare commits

..

1 Commits

Author SHA1 Message Date
Albert Backenhof
f8857b1594 Adjusted header height for medium font size
-The size pushed the lower end of the row-wrapper
 outside of the parent container, which was caused
 by the heights not adding up.

Issue: DEB-163
2019-04-10 11:23:11 +02:00
5 changed files with 9 additions and 41 deletions

View File

@@ -18,9 +18,6 @@ const definition = {
},
uses: 'data'
},
sorting: {
uses: 'sorting'
},
settings: {
items: {
ConceptSemaphores: conceptSemaphores,
@@ -31,25 +28,8 @@ const definition = {
},
uses: 'settings'
},
about: {
component: 'items',
label: 'About',
items: {
header: {
label: 'P&L pivot',
style: 'header',
component: 'text'
},
paragraph1: {
label: `P&L pivot is a Qlik Sense extension which allows you to display Profit & Loss
reporting with color and font customizations.`,
component: 'text'
},
paragraph2: {
label: 'P&L pivot is based upon an extension created by Ivan Felipe Asensio.',
component: 'text'
}
}
sorting: {
uses: 'sorting'
}
},
type: 'items'

View File

@@ -6,7 +6,7 @@ import Tooltip from '../tooltip/index.jsx';
const MeasurementColumnHeader = ({ baseCSS, general, hasSecondDimension, measurement, styling }) => {
const title = `${measurement.name} ${measurement.magnitudeLabelSuffix}`;
const { fontSizeAdjustment } = styling.headerOptions;
const isMediumFontSize = styling.headerOptions.fontSizeAdjustment === HEADER_FONT_SIZE.MEDIUM;
const isMediumFontSize = fontSizeAdjustment === HEADER_FONT_SIZE.MEDIUM;
if (hasSecondDimension) {
const isPercentageFormat = measurement.format.substring(measurement.format.length - 1) === '%';
@@ -20,7 +20,7 @@ const MeasurementColumnHeader = ({ baseCSS, general, hasSecondDimension, measure
...baseCSS,
cursor: 'default',
fontSize: `${baseFontSize + fontSizeAdjustment}px`,
height: isMediumFontSize ? '50px' : '25px',
height: isMediumFontSize ? '40px' : '25px',
verticalAlign: 'middle'
};
return (
@@ -39,7 +39,8 @@ const MeasurementColumnHeader = ({ baseCSS, general, hasSecondDimension, measure
);
}
const isLong = (title.length > 11 && fontSizeAdjustment === 0) || (title.length > 12 && fontSizeAdjustment === -2);
const isLong = (title.length > 11 && fontSizeAdjustment === HEADER_FONT_SIZE.SMALL)
|| (title.length > 12 && fontSizeAdjustment === HEADER_FONT_SIZE.MEDIUM);
const suffixWrap = isLong ? '70' : 'empty';
const style = {
...baseCSS,

View File

@@ -20,16 +20,12 @@ export default {
},
data: {
dimensions: {
max: function (nMeasures) {
return nMeasures < 9 ? 2 : 1;
},
max: 3,
min: 1,
uses: 'dimensions'
},
measures: {
max: function (nDims) {
return nDims < 2 ? 9 : 8;
},
max: 8,
min: 1,
uses: 'measures'
}

View File

@@ -18,8 +18,7 @@ function getAlignment (option) {
function getFontSizeAdjustment (option) {
const fontSizeAdjustmentOptions = {
1: HEADER_FONT_SIZE.SMALL,
2: HEADER_FONT_SIZE.MEDIUM,
3: 2
2: HEADER_FONT_SIZE.MEDIUM
};
return fontSizeAdjustmentOptions[option] || 0;

View File

@@ -87,14 +87,6 @@
text-overflow: ellipsis;
}
.wrapclass45 {
width: 100%;
height: 45px;
white-space: pre-line;
overflow: hidden;
display: block;
}
.wrapclass70 {
width: 100%;
height: 70px;