Skip to content
Snippets Groups Projects
Commit 209e828f authored by Alexander Rose's avatar Alexander Rose
Browse files

link params improvements

parent 94122916
No related branches found
No related tags found
No related merge requests found
......@@ -64,7 +64,9 @@ export function InterUnitLinkVisual(): ComplexVisual<InterUnitLinkProps> {
getLoci: getLinkLoci,
mark: markLink,
setUpdateState: (state: VisualUpdateState, newProps: InterUnitLinkProps, currentProps: InterUnitLinkProps) => {
state.createGeometry = newProps.radialSegments !== currentProps.radialSegments
if (newProps.linkScale !== currentProps.linkScale) state.createGeometry = true
if (newProps.linkSpacing !== currentProps.linkSpacing) state.createGeometry = true
if (newProps.radialSegments !== currentProps.radialSegments) state.createGeometry = true
}
})
}
......
......@@ -80,7 +80,9 @@ export function IntraUnitLinkVisual(): UnitsVisual<IntraUnitLinkProps> {
getLoci: getLinkLoci,
mark: markLink,
setUpdateState: (state: VisualUpdateState, newProps: LinkCylinderProps, currentProps: LinkCylinderProps) => {
state.createGeometry = newProps.radialSegments !== currentProps.radialSegments
if (newProps.linkScale !== currentProps.linkScale) state.createGeometry = true
if (newProps.linkSpacing !== currentProps.linkSpacing) state.createGeometry = true
if (newProps.radialSegments !== currentProps.radialSegments) state.createGeometry = true
}
})
}
......
......@@ -18,7 +18,6 @@ import { VisualContext } from 'mol-repr/representation';
export const LinkCylinderParams = {
linkScale: PD.Range('Link Scale', '', 0.4, 0, 1, 0.1),
linkSpacing: PD.Range('Link Spacing', '', 1, 0, 2, 0.01),
linkRadius: PD.Range('Link Radius', '', 0.25, 0, 10, 0.05),
radialSegments: PD.Numeric('Radial Segments', '', 16, 3, 56, 1),
}
export const DefaultLinkCylinderProps = PD.getDefaultValues(LinkCylinderParams)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment