Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Width/height is not respected #33

Open
fabdrol opened this issue Jun 18, 2020 · 0 comments
Open

Width/height is not respected #33

fabdrol opened this issue Jun 18, 2020 · 0 comments

Comments

@fabdrol
Copy link

fabdrol commented Jun 18, 2020

I'm setting width & height like below. However, the width/height always revert to the width/height of the window.

const App = () => {
    const width = `${window.innerWidth - 80}px`
    const height = `${window.innerHeight}px`
    const style = {
      width,
      height,
    }

    console.log(width, height) // prints: 720 480

    return (
      <section className="victron-wrapper">
        <VncDisplay url="ws://venus.local:81" style={style} width={width} height={height} onUpdateState={this.handleStateUpdate} />
        {status !== 'connected' && (
          <div className="victron-status-overlay">
            <div className="victron-status-inner">
              <Result status={status === 'error' ? 'warning' : 'info'} title={status === 'error' ? 'Venus GX is offline' : 'Verbinden met Venus GX...'} style={{ margin: 0, padding: 0 }} />
            </div>
          </div>
        )}
      </section>
    )
}
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

No branches or pull requests

1 participant