d4b8bdce7e
- Return to the ResizeAndMoveSlide event to do pan&zoom, respecting the viewed width and height ratio - Defaults zoom in toolbar to 100% like before to be more consistent - Fit to width and Reset Zoom is back (fit tho width still has some sync problems) - Fix to not change to first page when presenter reloads page
19 lines
406 B
JavaScript
Executable File
19 lines
406 B
JavaScript
Executable File
|
|
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;
|