Skip to content

add options for container and cssText#70

Open
yofreke wants to merge 1 commit into
mrdoob:masterfrom
jsio-private:master
Open

add options for container and cssText#70
yofreke wants to merge 1 commit into
mrdoob:masterfrom
jsio-private:master

Conversation

@yofreke

@yofreke yofreke commented Sep 15, 2016

Copy link
Copy Markdown

I am using stats.js in a react project. This means I do not want stats creating dom nodes. This PR lets a user configure the stats style string, as well as the container element.

React example usage:

CoolComponent extends React.Component {
  componentDidMount () {
    this._stats = new Stats({ container: this.refs.statsContainer, cssText: '' });
  }

  render () {
    return (
      <div class='cool-component'>
        <div ref='statsContainer' />
      </div>
    );
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants