@doe-casl/verain-view
Advanced tools
Comparing version 1.3.14 to 1.3.15
{ | ||
"name": "@doe-casl/verain-view", | ||
"version": "1.3.14", | ||
"version": "1.3.15", | ||
"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.", |
@@ -29,3 +29,2 @@ import React from 'react'; | ||
imageSize: 512, | ||
pinPitch: 1.6, | ||
}; | ||
@@ -68,2 +67,3 @@ | ||
const cell = data.value[0]; | ||
const pitch = this.props.viewData.cell.pitch.value[0]; | ||
this.cell = { | ||
@@ -75,3 +75,3 @@ num_rings: cell.mats.length, | ||
updateLookupTables(); | ||
updateCellImage(this.cell, this.state.imageSize, this.state.pinPitch); | ||
updateCellImage(this.cell, this.state.imageSize, pitch); | ||
this.cell.has3D.source.forceUpdate = true; | ||
@@ -92,2 +92,3 @@ } | ||
const length = cell.mats.length; | ||
const pitch = this.props.viewData.cell.pitch.value[0]; | ||
@@ -98,6 +99,3 @@ cell.mats.splice(idx, 0, cell.mats[idx - 1] || Object.keys(materials)[0]); | ||
if (length === idx) { | ||
cell.radii[idx] = Math.min( | ||
cell.radii[idx] + 1, | ||
this.state.pinPitch / 2 | ||
); | ||
cell.radii[idx] = Math.min(cell.radii[idx] + 1, pitch / 2); | ||
} else { | ||
@@ -144,2 +142,3 @@ // set radius to between before and after cell | ||
'materials not found' in this.props.ui.domain ? {} : this.props.ui.domain; | ||
const pitch = this.props.viewData.cell.pitch.value[0]; | ||
@@ -207,3 +206,3 @@ const materialOptions = Object.keys(materials).map((id) => ( | ||
const cellData = { | ||
pitch: this.state.pinPitch, | ||
pitch, | ||
colors, | ||
@@ -239,3 +238,3 @@ layers: items, | ||
}} | ||
overlayText={`Contact radius: ${this.state.pinPitch * 0.5}`} | ||
overlayText={`Contact radius: ${pitch * 0.5}`} | ||
onClick={() => {}} | ||
@@ -262,3 +261,3 @@ /> | ||
ui: PropTypes.object.isRequired, | ||
// viewData: PropTypes.object.isRequired, | ||
viewData: PropTypes.object.isRequired, | ||
}; | ||
@@ -265,0 +264,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6234774
18736