Browse Source

Added shortcut key ctrl+enter

flowchartTest
jos 9 years ago
parent
commit
1d47ca44b3
1 changed files with 9 additions and 1 deletions
  1. +9
    -1
      examples/network/categories/data/dotLanguage/dotPlayground.html

+ 9
- 1
examples/network/categories/data/dotLanguage/dotPlayground.html View File

@ -111,7 +111,7 @@
The examples marked with a star (*) come straight from the <a href="http://www.graphviz.org/Gallery.php">GraphViz gallery</a>.
</p>
<div>
<button id="draw">Draw</button>
<button id="draw" title="Draw the DOT graph (Ctrl+Enter)">Draw</button>
<span id="error"></span>
</div>
</div>
@ -173,6 +173,14 @@ digraph {
$(window).resize(resize);
$(window).load(draw);
$('#data').keydown(function (event) {
if (event.ctrlKey && event.keyCode === 13) { // Ctrl+Enter
draw();
event.stopPropagation();
event.preventDefault();
}
});
function resize() {
$('#contents').height($('body').height() - $('#header').height() - 30);
}

Loading…
Cancel
Save