Skip to content

Commit

Permalink
fix default sizes
Browse files Browse the repository at this point in the history
  • Loading branch information
SebCanet committed May 14, 2020
1 parent 76fff91 commit fd53b7d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
7 changes: 2 additions & 5 deletions www/blocklyduino/css/blocklyduino.css
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ td.tabMiddle {
overflow: hidden;
}
#content_area{
width: 100%;
width: calc(100% - 50px);
height: 100%;
min-width: 10px;
}
Expand All @@ -232,15 +232,12 @@ td.tabMiddle {
}
#code_peek {
background-color: #FFFFFF;
width: 100%;
width: 50px;
height: 100%;
min-width: 5px;
}
#barre_h{
cursor: row-resize;
/* padding : 0px; */
/* margin : 0px; */
height: 30px;
width: 100%;
background-color : #17A1A5;
background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='30' height='10'><path d='M0 2 h30 0 M0 5 h30 0 M0 8 h30 0' fill='none' stroke='black'/></svg>");
Expand Down
5 changes: 3 additions & 2 deletions www/blocklyduino/js/blockly/code.js
Original file line number Diff line number Diff line change
Expand Up @@ -445,11 +445,12 @@ Code.init = function () {
element.style.left = mouse_down_info.offsetLeft + delta.x + "px";
first.style.width = (mouse_down_info.firstWidth + delta.x) + "px";
second.style.width = (mouse_down_info.secondWidth - delta.x) + "px";
//hide button if div si too thin
if (document.getElementById("code_peek").offsetWidth < 50)
document.getElementById("copyCodeButton").style.visibility = 'hidden';
else
document.getElementById("copyCodeButton").style.visibility = 'visible';
}
}
if (direction === "V") // Vertical
{
// prevent negative-sized elements
Expand All @@ -462,8 +463,8 @@ Code.init = function () {
Blockly.svgResize(Code.workspace);
}
}
dragElement(document.getElementById("separator"), "H", document.getElementById("content_area"), document.getElementById("code_peek"));
dragElement(document.getElementById("barre_h"), "V", document.getElementById("wrapper_up"), document.getElementById("content_serial"));
dragElement(document.getElementById("separator"), "H", document.getElementById("content_area"), document.getElementById("code_peek"));

Code.renderContent();
Code.workspace.addChangeListener(Code.renderContent);
Expand Down

0 comments on commit fd53b7d

Please sign in to comment.