farminf / pannellum-react

React Component for Pannellum (open source panorama viewer for the web)
MIT License
112 stars 81 forks source link

Honour style property #81

Closed torokze closed 4 years ago

torokze commented 4 years ago

Hi,

<Pannellum width="100%" height="100%" style={...} ... />

Should honour other styling not just width/height.

Zolee

farminf commented 4 years ago

These are pannellum (the main library) props not the CSS styles.

torokze commented 4 years ago

Yes, i know but when I try to use 'style' it is not applied on the DOM node of the pannellum.

torokze commented 4 years ago

How can I add more styling to this? <Panelllum style={{ ... }} /> doesn't work obviously. Reopen please.

render() { let { width, height } = this.props; let divStyle = { width: width, height: height }; return ( <div id={this.props.id ? this.props.id : this.state.id} style={divStyle} ref={node => (this.imageNode = node)} /> ); }