Skip to content

Commit

Permalink
make node smaller
Browse files Browse the repository at this point in the history
  • Loading branch information
buckhalt committed Dec 18, 2024
1 parent edbf769 commit 26335ad
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
10 changes: 4 additions & 6 deletions lib/interviewer/components/Node.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
import { useSelector } from 'react-redux';
import { getEntityAttributes } from '~/lib/interviewer/ducks/modules/network';
import UINode from '~/lib/ui/components/Node';
import {
getNodeColor, labelLogic,
} from '../selectors/network';
import { getNodeColor, labelLogic } from '../selectors/network';
import { getProtocolCodebook } from '../selectors/protocol';
import { getEntityAttributes } from '~/lib/interviewer/ducks/modules/network';

/**
* Renders a Node.
*/
* Renders a Node.
*/

const Node = (props) => {
const { type } = props;
Expand Down
5 changes: 4 additions & 1 deletion lib/interviewer/containers/Interfaces/Geospatial.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,10 @@ export default function GeospatialInterface({
animate="animate"
exit="exit"
>
<Node {...stageNodes[navState.activeIndex]} />
<Node
{...stageNodes[navState.activeIndex]}
style={{ fontSize: `calc(var(--nc-base-font-size) * 8)` }}
/>
</motion.div>
</AnimatePresence>
<Button size="small" onClick={moveForward}>
Expand Down
7 changes: 4 additions & 3 deletions lib/ui/components/Node.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import PropTypes from 'prop-types';
import { Component } from 'react';

/**
* Renders a Node.
Expand All @@ -15,6 +15,7 @@ class Node extends Component {
selected = false,
selectedColor = '',
linking = false,
style,
handleClick,
} = this.props;

Expand All @@ -37,7 +38,7 @@ class Node extends Component {
label.length < 22 ? label : `${label.substring(0, 18)}\u{AD}...`; // Add ellipsis for really long labels

return (
<div className={classes} onClick={() => handleClick?.()}>
<div className={classes} onClick={() => handleClick?.()} style={style}>
<svg
viewBox="0 0 500 500"
xmlns="http://www.w3.org/2000/svg"
Expand Down

0 comments on commit 26335ad

Please sign in to comment.