Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions src/Stats.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,22 @@
* @author mrdoob / http://mrdoob.com/
*/

var Stats = function () {
/**
* @param {Object} [opts]
* @param {Object} [opts.container] - container DOM node
* @param {Object} [opts.cssText] - This style string will be applied to the conatiner. Use a falsey value (except `undefined`) to skip set.
*/
var Stats = function (opts) {
opts = opts || {};
opts.container = opts.container || document.createElement( 'div' );
opts.cssText = opts.cssText !== undefined ? opts.cssText : 'position:fixed;top:0;left:0;cursor:pointer;opacity:0.9;z-index:10000';

var mode = 0;

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

event.preventDefault();
Expand Down