From 1d47ca44b3e2b4c6a28dcd4462ebd44c523dd064 Mon Sep 17 00:00:00 2001
From: jos
Date: Thu, 21 May 2015 16:41:49 +0200
Subject: [PATCH] Added shortcut key ctrl+enter
---
.../categories/data/dotLanguage/dotPlayground.html | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/examples/network/categories/data/dotLanguage/dotPlayground.html b/examples/network/categories/data/dotLanguage/dotPlayground.html
index f9b08652..a2b200e2 100644
--- a/examples/network/categories/data/dotLanguage/dotPlayground.html
+++ b/examples/network/categories/data/dotLanguage/dotPlayground.html
@@ -111,7 +111,7 @@
The examples marked with a star (*) come straight from the GraphViz gallery.
-
+
@@ -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);
}