Skip to content

Commit

Permalink
Set container position fixed by default. Renamed domElement to dom.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrdoob committed Apr 11, 2016
1 parent 7f69fbc commit 485c4fd
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/Stats.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ var Stats = function () {
var mode = 0;

var container = document.createElement( 'div' );
container.style.cssText = 'cursor:pointer;opacity:0.9';
container.style.cssText = 'position:fixed;top:0;left:0;cursor:pointer;opacity:0.9;z-index:10000';
container.addEventListener( 'click', function ( event ) {

event.preventDefault();
Expand Down Expand Up @@ -55,13 +55,11 @@ var Stats = function () {

REVISION: 16,

domElement: container,
dom: container,

addPanel: addPanel,
showPanel: showPanel,

setMode: showPanel, // backwards compatibility

begin: function () {

beginTime = ( performance || Date ).now();
Expand Down Expand Up @@ -100,7 +98,12 @@ var Stats = function () {

beginTime = this.end();

}
},

// Backwards Compatibility

domElement: container,
setMode: showPanel

};

Expand Down

0 comments on commit 485c4fd

Please sign in to comment.