Skip to content

Commit

Permalink
Showing 0.5 black color when rollovering code (thanks @p01!)
Browse files Browse the repository at this point in the history
Also improved code panel position/dimension handling.
  • Loading branch information
mrdoob committed Nov 10, 2011
1 parent 31db75a commit aa1988c
Showing 1 changed file with 18 additions and 7 deletions.
25 changes: 18 additions & 7 deletions build/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@
#code {

position: absolute;
top: 80px;
left: 30px;
width: 92%;
height: 90%;

padding: 12px;

border: none;
border-radius: 5px;

color: #ffffff;
background-color: transparent;
border: none;
font-family: Monospace;
font-size: 14px;
font-weight: bold;
Expand All @@ -33,6 +33,12 @@

}

#code:hover {

background-color:rgba(0,0,0,.5);

}

#tools {

position: absolute;
Expand Down Expand Up @@ -99,7 +105,7 @@

// Greetings to Iq/RGBA! ;)

var canvas, gl, buffer, currentProgram, compileButton,
var code, canvas, gl, buffer, currentProgram, compileButton,
vertex_position, parameters = { start_time: Date.now(), time: 0, screenWidth: 0, screenHeight: 0 };

init();
Expand All @@ -115,7 +121,7 @@

//

var code = document.createElement( 'textarea' );
code = document.createElement( 'textarea' );
code.id = 'code';
code.style.visibility = 'visible';
code.addEventListener( 'keydown', function ( event ) {
Expand Down Expand Up @@ -289,6 +295,11 @@

function onWindowResize( event ) {

code.style.top = '75px';
code.style.left = '25px';
code.style.width = ( window.innerWidth - 75 ) + 'px';
code.style.height = ( window.innerHeight - 125 ) + 'px';

canvas.width = window.innerWidth;
canvas.height = window.innerHeight;

Expand Down

0 comments on commit aa1988c

Please sign in to comment.