Skip to content

Commit

Permalink
Clear graph and change icon.
Browse files Browse the repository at this point in the history
  • Loading branch information
mkalus committed Sep 2, 2015
1 parent b09f655 commit 3c79759
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 6 deletions.
9 changes: 7 additions & 2 deletions src/main/resources/js/segrada.js
Original file line number Diff line number Diff line change
Expand Up @@ -941,8 +941,9 @@
if (selection.nodes.length > 0) graphNodes.remove(selection.nodes);
e.preventDefault();
});
$('#sg-graph-action-fit').click(function(e) {
graphNetwork.fit();
$('#sg-graph-action-restart').click(function(e) {
graphEdges.clear();
graphNodes.clear();
e.preventDefault();
});
$('#sg-graph-action-reload').click(function(e) {
Expand All @@ -951,6 +952,10 @@
graphInitialize();
e.preventDefault();
});
$('#sg-graph-action-fit').click(function(e) {
graphNetwork.fit();
e.preventDefault();
});
$('#sg-graph-close').click(function(e) {
graphHide();
e.preventDefault();
Expand Down
3 changes: 2 additions & 1 deletion src/main/webapp/WEB-INF/i18n/messages.properties
Original file line number Diff line number Diff line change
Expand Up @@ -170,4 +170,5 @@ Users=Users
User=User
field.searchWithinDocument=Search within full text of document
Fit=Fit View
Reload=Reload
Reload=Reload
Clear=Clear
3 changes: 2 additions & 1 deletion src/main/webapp/WEB-INF/i18n/messages_de.properties
Original file line number Diff line number Diff line change
Expand Up @@ -170,4 +170,5 @@ User=Benutzer
Users=Benutzer
field.searchWithinDocument=Innerhalb des Dokuments suchen
Fit=Ansicht einpassen
Reload=Neu laden
Reload=Neu laden
Clear=Leeren
3 changes: 2 additions & 1 deletion src/main/webapp/WEB-INF/templates/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@
<div id="sg-graph-container" style="display: none;">
<div id="sg-graph-header">
<div class="pull-right">
<a href="#" class="btn btn-link" id="sg-graph-action-restart" th:title="#{Clear}" aria-label="Clear"><i class="fa fa-bomb"></i></a>
<a href="#" class="btn btn-link" id="sg-graph-action-reload" th:title="#{Reload}" aria-label="Reload"><i class="fa fa-refresh"></i></a>
<a href="#" class="btn btn-link" id="sg-graph-action-fit" th:title="#{Fit}" aria-label="Fit View"><i class="fa fa-circle-o-notch"></i></a>
<a href="#" class="btn btn-link" id="sg-graph-action-fit" th:title="#{Fit}" aria-label="Fit View"><i class="fa fa-arrows-alt"></i></a>
<a href="#" class="btn btn-link" id="sg-graph-action-remove" th:title="#{RemoveSelected}" aria-label="Remove Selected Elements"><i class="fa fa-minus-circle"></i></a>
</div>

Expand Down
2 changes: 1 addition & 1 deletion src/main/webapp/js/segrada.min.js

Large diffs are not rendered by default.

0 comments on commit 3c79759

Please sign in to comment.