Remove index===3 checks from getStyleForProjectedBlockAtIndex
This commit is contained in:
parent
2b94cab046
commit
f8706f0a62
@ -41,22 +41,12 @@ export class BlockchainProjectedBlocksComponent implements OnInit, OnDestroy {
|
|||||||
getStyleForProjectedBlockAtIndex(index: number) {
|
getStyleForProjectedBlockAtIndex(index: number) {
|
||||||
const greenBackgroundHeight = 100 - (this.projectedBlocks[index].blockWeight / 4000000) * 100;
|
const greenBackgroundHeight = 100 - (this.projectedBlocks[index].blockWeight / 4000000) * 100;
|
||||||
if (window.innerWidth <= 768) {
|
if (window.innerWidth <= 768) {
|
||||||
if (index === 3) {
|
|
||||||
return {
|
|
||||||
'top': 40 + index * 155 + 'px'
|
|
||||||
};
|
|
||||||
}
|
|
||||||
return {
|
return {
|
||||||
'top': 40 + index * 155 + 'px',
|
'top': 40 + index * 155 + 'px',
|
||||||
'background': `repeating-linear-gradient(#554b45, #554b45 ${greenBackgroundHeight}%,
|
'background': `repeating-linear-gradient(#554b45, #554b45 ${greenBackgroundHeight}%,
|
||||||
#bd7c13 ${Math.max(greenBackgroundHeight, 0)}%, #c5345a 100%)`,
|
#bd7c13 ${Math.max(greenBackgroundHeight, 0)}%, #c5345a 100%)`,
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
if (index === 3) {
|
|
||||||
return {
|
|
||||||
'right': 40 + index * 155 + 'px'
|
|
||||||
};
|
|
||||||
}
|
|
||||||
return {
|
return {
|
||||||
'right': 40 + index * 155 + 'px',
|
'right': 40 + index * 155 + 'px',
|
||||||
'background': `repeating-linear-gradient(#554b45, #554b45 ${greenBackgroundHeight}%,
|
'background': `repeating-linear-gradient(#554b45, #554b45 ${greenBackgroundHeight}%,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user