[go: nahoru, domu]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Basic search and non-zero-count functionality for callback graph #2434

Open
wants to merge 15 commits into
base: dev
Choose a base branch
from
Open
Prev Previous commit
Next Next commit
updated shortkeys
  • Loading branch information
jcuypers committed Feb 24, 2023
commit bf37baf4f5ee663bbbb61066f0aeb7a56854e2f3
Original file line number Diff line number Diff line change
Expand Up @@ -229,25 +229,17 @@ function CallbackGraph() {

useMousetrap('0', () => toggle_non_zero());


// need to make this work whenever the input box has focus
useMousetrap('esc', e => {
console.log('Escape')
e.preventDefault();
setSearchBoxActive(false);
});

useMousetrap('s', e => {
//sbi = document.getElementById('searchBoxInput')
console.log('s - search : '+e.target);
if (e.target === document.getElementById('searchBoxInput')) {
console.log('ok this is fine')
} else {
if (e.target !== document.getElementById('searchBoxInput')) {
e.preventDefault();
setSearchBoxActive(!searchBoxActive);
}


});

// Custom hook to make sure cytoscape is loaded.
Expand Down Expand Up @@ -338,7 +330,7 @@ function CallbackGraph() {

useCytoscapeEffect(
cy => {
hideZeroCountNodes(cy, hideZeroOnly)
hideZeroCountNodes(cy, hideZeroOnly);
},
[hideZeroOnly]
);
Expand Down Expand Up @@ -483,11 +475,13 @@ function CallbackGraph() {
</div>
<div className='filter-bar'>
<input

type='checkbox'
id='chkb_non_zero'
checked={hideZeroOnly}
=> {toggle_non_zero(e); e.target.blur()}}
=> {
toggle_non_zero(e);
e.target.blur();
}}
/>
<label for='chkb_non_zero'>Hide zero values</label>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export function SearchBox(props) {
searchBoxRef.current.value = '';
setSearchTerm('');

props.onSearchBarClicked()
props.onSearchBarClicked();

props.onSelectionChanged(event);
};
Expand Down