Skip to content

Commit e2729f9

Browse files
authored
Merge pull request #4
Update from theia trace extension
2 parents 0c2bddb + a9835dc commit e2729f9

File tree

3 files changed

+18
-15
lines changed

3 files changed

+18
-15
lines changed

base/.eslintrc.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ module.exports = {
1515
'plugin:@typescript-eslint/recommended',
1616
'../../../configs/base.eslintrc.json',
1717
'../../../configs/warnings.eslintrc.json',
18-
'../../../configs/errors.eslintrc.json',
19-
"prettier"
18+
'../../../configs/errors.eslintrc.json'
2019
],
2120
ignorePatterns: [
2221
'node_modules',

react-components/.eslintrc.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ module.exports = {
1919
'plugin:@typescript-eslint/recommended',
2020
'../../../configs/base.eslintrc.json',
2121
'../../../configs/warnings.eslintrc.json',
22-
'../../../configs/errors.eslintrc.json',
23-
"prettier"
22+
'../../../configs/errors.eslintrc.json'
2423
],
2524
ignorePatterns: [
2625
'node_modules',

react-components/src/components/abstract-gantt-output-component.tsx

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1381,21 +1381,26 @@ export abstract class AbstractGanttOutputComponent<
13811381
}
13821382

13831383
const stateStyle = outputStyle as OutputElementStyle;
1384-
const elementStyle = styles[stateStyle.parentKey];
1385-
if (elementStyle) {
1386-
return {
1387-
color: parseInt(elementStyle.color, 16),
1388-
height: this.props.style.rowHeight * elementStyle.height,
1389-
borderWidth: state.selected ? 2 : 0,
1390-
borderColor: 0xeef20c
1391-
};
1384+
let parentKey = 'no-parent';
1385+
if (stateStyle.parentKey) {
1386+
parentKey = stateStyle.parentKey;
1387+
const elementStyle = styles[parentKey];
1388+
if (elementStyle) {
1389+
return {
1390+
color: parseInt(elementStyle.color, 16),
1391+
height: this.props.style.rowHeight * elementStyle.height,
1392+
borderWidth: state.selected ? 2 : 0,
1393+
borderColor: 0xeef20c
1394+
};
1395+
}
1396+
style = this.styleMap.get(parentKey);
13921397
}
13931398

1394-
style = this.styleMap.get(stateStyle.parentKey);
13951399
if (style === undefined) {
1396-
style = backupStyles[(Math.abs(hash(stateStyle.parentKey)) as number) % backupStyles.length];
1397-
this.styleMap.set(stateStyle.parentKey, style);
1400+
style = backupStyles[Math.abs(hash(parentKey)) % backupStyles.length];
1401+
this.styleMap.set(parentKey, style);
13981402
}
1403+
13991404
return {
14001405
color: style.color,
14011406
height: style.height,

0 commit comments

Comments
 (0)