Browse Source

link params improvements

Alexander Rose 6 years ago
parent
commit
209e828fb0

+ 3 - 1
src/mol-repr/structure/visual/inter-unit-link-cylinder.ts

@@ -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
         }
     })
 }

+ 3 - 1
src/mol-repr/structure/visual/intra-unit-link-cylinder.ts

@@ -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
         }
     })
 }

+ 0 - 1
src/mol-repr/structure/visual/util/link.ts

@@ -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)