Moved presentation overlays' rendering to a separate function
This commit is contained in:
parent
ff4e7bffd0
commit
838382b6f9
0
bigbluebutton-html5/imports/api/2.0/slides/server/modifiers/addSlide.js
Executable file → Normal file
0
bigbluebutton-html5/imports/api/2.0/slides/server/modifiers/addSlide.js
Executable file → Normal file
0
bigbluebutton-html5/imports/api/2.0/slides/server/modifiers/resizeSlide.js
Executable file → Normal file
0
bigbluebutton-html5/imports/api/2.0/slides/server/modifiers/resizeSlide.js
Executable file → Normal file
@ -211,26 +211,7 @@ export default class PresentationArea extends React.Component {
|
||||
slideHeight={height}
|
||||
/>
|
||||
</g>
|
||||
{this.props.userIsPresenter || this.props.multiUser ?
|
||||
<PresentationOverlayContainer
|
||||
slideWidth={width}
|
||||
slideHeight={height}
|
||||
getSvgRef={this.getSvgRef}
|
||||
>
|
||||
<WhiteboardOverlayContainer
|
||||
getSvgRef={this.getSvgRef}
|
||||
whiteboardId={slideObj.id}
|
||||
slideWidth={width}
|
||||
slideHeight={height}
|
||||
viewBoxX={x}
|
||||
viewBoxY={y}
|
||||
viewBoxWidth={viewBoxWidth}
|
||||
viewBoxHeight={viewBoxHeight}
|
||||
physicalSlideWidth={(adjustedSizes.width / slideObj.widthRatio) * 100}
|
||||
physicalSlideHeight={(adjustedSizes.height / slideObj.heightRatio) * 100}
|
||||
/>
|
||||
</PresentationOverlayContainer>
|
||||
: null }
|
||||
{this.renderOverlays(slideObj, adjustedSizes)}
|
||||
</svg>
|
||||
</CSSTransitionGroup>
|
||||
</div>
|
||||
@ -239,6 +220,43 @@ export default class PresentationArea extends React.Component {
|
||||
return null;
|
||||
}
|
||||
|
||||
renderOverlays(slideObj, adjustedSizes) {
|
||||
if (!this.props.userIsPresenter && !this.props.multiUser) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// retrieving the pre-calculated data from the slide object
|
||||
const {
|
||||
x,
|
||||
y,
|
||||
width,
|
||||
height,
|
||||
viewBoxWidth,
|
||||
viewBoxHeight,
|
||||
} = slideObj.calculatedData;
|
||||
|
||||
return (
|
||||
<PresentationOverlayContainer
|
||||
slideWidth={width}
|
||||
slideHeight={height}
|
||||
getSvgRef={this.getSvgRef}
|
||||
>
|
||||
<WhiteboardOverlayContainer
|
||||
getSvgRef={this.getSvgRef}
|
||||
whiteboardId={slideObj.id}
|
||||
slideWidth={width}
|
||||
slideHeight={height}
|
||||
viewBoxX={x}
|
||||
viewBoxY={y}
|
||||
viewBoxWidth={viewBoxWidth}
|
||||
viewBoxHeight={viewBoxHeight}
|
||||
physicalSlideWidth={(adjustedSizes.width / slideObj.widthRatio) * 100}
|
||||
physicalSlideHeight={(adjustedSizes.height / slideObj.heightRatio) * 100}
|
||||
/>
|
||||
</PresentationOverlayContainer>
|
||||
);
|
||||
}
|
||||
|
||||
renderPresentationToolbar() {
|
||||
if (this.props.currentSlide) {
|
||||
return (
|
||||
|
Loading…
Reference in New Issue
Block a user