bigbluebutton-Github/bigbluebutton-html5/imports/api/slides/server/helpers.js

19 lines
406 B
JavaScript
Raw Normal View History

const calculateSlideData = (slideData) => {
const {
width, height, xOffset, yOffset, widthRatio, heightRatio,
} = slideData;
// calculating viewBox and offsets for the current presentation
return {
width,
height,
x: xOffset,
y: yOffset,
viewBoxWidth: (width * widthRatio) / 100,
viewBoxHeight: (height * heightRatio) / 100,
};
};
export default calculateSlideData;