Last active
January 30, 2017 15:05
-
-
Save jexp/37de1951fdb4b776726e5fd065c66846 to your computer and use it in GitHub Desktop.
Bookmarklet to zoom and pan Neo4j graph viz and query plans, Hold "Alt" to zoom & pan.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript: (function() { | |
var createTable = function() { $("neo-table > table.table.data:not(datatable)").addClass("datatable").DataTable(); }; | |
if ($("#style-datatable").length == 0) { | |
$("body").append($('<link id="style-datatable" rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.13/css/jquery.dataTables.min.css">')); | |
$.getScript('//cdn.datatables.net/1.10.13/js/jquery.dataTables.min.js',createTable); | |
} else { | |
createTable(); | |
} | |
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript: (function() { var script = document.createElement("script"); | |
script.setAttribute("src", "//cdn.rawgit.com/anvaka/panzoom/v1.2.1/dist/panzoom.min.js"); | |
script.addEventListener('load', function() { | |
$(".graph > g,.query-plan > g").each(function() { panzoom($(this)[0], { beforeWheel: function(e) { return !e.altKey; }}); }); | |
}, false); | |
document.body.appendChild(script);})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment