2017-09-19 06:20:44 +08:00
|
|
|
|
|
|
|
const calculateSlideData = (slideData) => {
|
2019-08-01 03:10:41 +08:00
|
|
|
const {
|
|
|
|
width, height, xOffset, yOffset, widthRatio, heightRatio,
|
|
|
|
} = slideData;
|
2017-09-19 06:20:44 +08:00
|
|
|
|
|
|
|
// calculating viewBox and offsets for the current presentation
|
|
|
|
return {
|
2019-08-01 03:10:41 +08:00
|
|
|
width,
|
|
|
|
height,
|
2022-08-16 20:12:43 +08:00
|
|
|
x: xOffset,
|
|
|
|
y: yOffset,
|
2017-09-19 06:20:44 +08:00
|
|
|
viewBoxWidth: (width * widthRatio) / 100,
|
|
|
|
viewBoxHeight: (height * heightRatio) / 100,
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
export default calculateSlideData;
|