@doe-casl/verain-view
Advanced tools
Comparing version 1.3.17 to 1.3.18
{ | ||
"name": "@doe-casl/verain-view", | ||
"version": "1.3.17", | ||
"version": "1.3.18", | ||
"description": "VeraInView is a standalone HTML file that can act as an application to visualize your VERAin XML files.", | ||
@@ -5,0 +5,0 @@ "author": "Kitware, Inc.", |
@@ -114,7 +114,17 @@ import React from 'react'; | ||
const materialOptions = Object.keys(materials).map((id) => ( | ||
<option key={id} value={id}> | ||
{materials[id].name[0]} | ||
</option> | ||
)); | ||
const materialOptions = Object.keys(materials).map((id) => { | ||
// adds on opaque alpha channel | ||
const color = ColorManager.toRGBA(materials[id].color.concat([1])); | ||
return ( | ||
<option | ||
key={id} | ||
value={id} | ||
style={{ | ||
background: color, | ||
}} | ||
> | ||
{materials[id].name[0]} | ||
</option> | ||
); | ||
}); | ||
@@ -121,0 +131,0 @@ const columns = [ |
@@ -96,7 +96,10 @@ import React from 'react'; | ||
> | ||
{Object.keys(cells).map((id) => ( | ||
<option key={id} value={id}> | ||
{cells[id].name[0]} | ||
</option> | ||
))} | ||
{Object.keys(cells).map((id) => { | ||
const bg = ColorManager.toRGBA(cells[id].color.concat([1])); | ||
return ( | ||
<option key={id} value={id} style={{ background: bg }}> | ||
{cells[id].name[0]} | ||
</option> | ||
); | ||
})} | ||
</select> | ||
@@ -103,0 +106,0 @@ ); |
6239742
18928