Skip to content

Commit

Permalink
proper organism tab #19: display warning upon reaching tree limit
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidLeoni committed Sep 10, 2020
1 parent 915d9de commit b3f3451
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
Binary file added docs/performance-test.sb3
Binary file not shown.
10 changes: 10 additions & 0 deletions src/components/botch/botch-life-tree.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ import styles from './botch-life-tree.css';
import BotchLifeTreeItem from './botch-life-tree-item.jsx';
import log from '../../lib/log.js';

/* global BOTCH */

const messages = defineMessages({
filterPlaceholder: {
id: 'gui.library.filterPlaceholder',
Expand Down Expand Up @@ -296,6 +298,14 @@ class BotchLifeTree extends React.Component {
</g>

))}
{Object.keys(fl).length >= BOTCH.constructor.MAX_STORAGE ?
<text
x={vb.x + (0.05 * vb.width)}
y={vb.y + (0.05 * vb.height)}
style={{'font-size': 14 * this.props.viz.zoom,
'fill': 'red'}}
> {`TREE IS FULL ! To empty it, click on the green flag!`}</text> :
null}
</svg>
);
}
Expand Down
2 changes: 1 addition & 1 deletion src/containers/botch-organism-tab.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ class BotchOrganismTab extends React.Component {
const layout = {};


// fictitious node, outside viewport on purpose
// fictitious node, outside viewBox on purpose
const p0 = {};

p0.generation = 0;
Expand Down

0 comments on commit b3f3451

Please sign in to comment.