react-vnc-display icon indicating copy to clipboard operation
react-vnc-display copied to clipboard

Width/height is not respected

Open fabdrol opened this issue 4 years ago • 0 comments

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>
    )
}

fabdrol avatar Jun 18 '20 11:06 fabdrol