Skip to content

Commit

Permalink
feat(core): adds deselect all button to dep-graph (#2912)
Browse files Browse the repository at this point in the history
Closes #2911

ISSUES CLOSED: 2911
  • Loading branch information
james-gibson committed Apr 24, 2020
1 parent 125872f commit 73d0312
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/workspace/src/core/dep-graph/dep-graph.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ <h4>Display Options</h4>
<button id="select-all-button" onclick="window.selectAllProjects()">
Select All
</button>
<button id="deselect-all-button" onclick="window.deselectAllProjects()">
Deselect All
</button>
</div>

<label>
Expand Down
12 changes: 12 additions & 0 deletions packages/workspace/src/core/dep-graph/dep-graph.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,18 @@ window.selectAllProjects = () => {
window.filterProjects();
};

window.deselectAllProjects = () => {
window.focusedProject = null;
document.getElementById('focused-project').hidden = true;
document.getElementById('focused-project-name').innerText = '';

getProjectCheckboxes().forEach(checkbox => {
checkbox.checked = false;
});

window.filterProjects();
};

function createDirectoryParents(g, directories) {
let childDirectory = directories.join('/');
let childDirectoryId = `dir-${childDirectory}`;
Expand Down

0 comments on commit 73d0312

Please sign in to comment.