Skip to content

Commit

Permalink
fixed editor and run-button height and visibility issues
Browse files Browse the repository at this point in the history
  • Loading branch information
jexp committed Oct 12, 2014
1 parent 8eb7e5e commit dbe7d48
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
5 changes: 3 additions & 2 deletions src/main/webapp/javascripts/console.js
Expand Up @@ -347,8 +347,9 @@ function showWelcome(json) {

function resizeOutput() {
var $output = $("#output");
var editorHeight = $(".CodeMirror-scroll").height();
var editorHeight = Math.min($(".CodeMirror-scroll").height(),128);
var windowHeight = $(window).height();
// console.log("editorHeight",editorHeight,"scrollHeight",$(".CodeMirror-scroll").height(),"windowHeight",windowHeight);
$output.css({
'height': ( windowHeight - editorHeight - 15 ) + 'px'
});
Expand Down Expand Up @@ -424,7 +425,7 @@ function sendNext(msg) {
post("console/cypher"+getPostQueryParams(), _query, function (res) {
if (msg.action === "query" && msg.call_id && graphgistWindow) {
res.call_id = msg.call_id;
console.log("res",res);
// console.log("res",res);
graphgistWindow.postMessage(JSON.stringify(res), "*");
}
else {
Expand Down
2 changes: 1 addition & 1 deletion src/main/webapp/javascripts/visualization.js
Expand Up @@ -84,7 +84,7 @@ function GraphVisualization() {

function visualize(id, w, h, data) {
var vis = d3.select("#" + id).append("svg").attr("id", "graph").attr("width", w / 2).attr("height", h)
.attr("style", "pointer-events:fill; margin-left:" + w / 2);
.attr("style", "pointer-events:fill; margin-left:" + w / 2+"px");

var force = self.force = d3.layout.force().nodes(data.nodes).links(data.links).gravity(.2).distance(80)
.charge(-1000).size([ w / 2, h ]).start();
Expand Down
2 changes: 1 addition & 1 deletion src/main/webapp/stylesheets/light.css
Expand Up @@ -46,7 +46,7 @@ code {

.cm-s-cypher {
text-shadow: none;
background: #f5f5f5;
background: white;
color: black;
}

Expand Down
11 changes: 9 additions & 2 deletions src/main/webapp/stylesheets/main.css
Expand Up @@ -47,6 +47,8 @@ a:link, a:visited {
bottom: 0;
left: 0;
right: 0;
min-height: 64px;
max-height: 128px;
}

#graph {
Expand Down Expand Up @@ -140,6 +142,7 @@ pre {
bottom: 1px;
width: 4.7%;
margin: 0px;
max-height: 128px;
}


Expand All @@ -165,8 +168,9 @@ h3 {
}

.CodeMirror-scroll {
height: auto;
overflow-y: hidden;
min-height: 64px;
max-height: 128px;
overflow-y: scroll;
overflow-x: auto;
}

Expand All @@ -184,4 +188,7 @@ h3 {

#editor .cm-s-neo {
margin: 0;
max-height: 128px;
overflow-y: scroll;
background: #ffffff;
}

0 comments on commit dbe7d48

Please sign in to comment.