Merge pull request #18724 from antobinary/merge-sept-6
chore: Merge BBB 2.6.14 into v2.7.x-release
This commit is contained in:
commit
29f52b3b26
@ -1,7 +1,7 @@
|
||||
import * as React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { TldrawApp, Tldraw } from '@tldraw/tldraw';
|
||||
import SlideCalcUtil, { HUNDRED_PERCENT } from '/imports/utils/slideCalcUtils';
|
||||
import SlideCalcUtil, { HUNDRED_PERCENT, MAX_PERCENT } from '/imports/utils/slideCalcUtils';
|
||||
// eslint-disable-next-line import/no-extraneous-dependencies
|
||||
import { Utils } from '@tldraw/core';
|
||||
import Cursors from './cursors/container';
|
||||
@ -93,11 +93,13 @@ export default function Whiteboard(props) {
|
||||
const [history, setHistory] = React.useState(null);
|
||||
const [zoom, setZoom] = React.useState(HUNDRED_PERCENT);
|
||||
const [tldrawZoom, setTldrawZoom] = React.useState(1);
|
||||
const zoomValueRef = React.useRef(zoomValue);
|
||||
const [isMounting, setIsMounting] = React.useState(true);
|
||||
const prevShapes = usePrevious(shapes);
|
||||
const prevSlidePosition = usePrevious(slidePosition);
|
||||
const prevFitToWidth = usePrevious(fitToWidth);
|
||||
const prevSvgUri = usePrevious(svgUri);
|
||||
const prevPageId = usePrevious(curPageId);
|
||||
const language = mapLanguage(Settings?.application?.locale?.toLowerCase() || 'en');
|
||||
const [currentTool, setCurrentTool] = React.useState(null);
|
||||
const [currentStyle, setCurrentStyle] = React.useState({});
|
||||
@ -115,6 +117,10 @@ export default function Whiteboard(props) {
|
||||
};
|
||||
}, []);
|
||||
|
||||
React.useEffect(() => {
|
||||
zoomValueRef.current = zoomValue;
|
||||
}, [zoomValue]);
|
||||
|
||||
const setSafeTLDrawAPI = (api) => {
|
||||
if (isMountedRef.current) {
|
||||
setTldrawAPI(api);
|
||||
@ -221,6 +227,14 @@ export default function Whiteboard(props) {
|
||||
};
|
||||
|
||||
const handleWheelEvent = (event) => {
|
||||
if ((zoomValueRef.current >= MAX_PERCENT && event.deltaY < 0)
|
||||
|| (zoomValueRef.current <= HUNDRED_PERCENT && event.deltaY > 0))
|
||||
{
|
||||
event.stopPropagation();
|
||||
event.preventDefault();
|
||||
return window.dispatchEvent(new Event('resize'));
|
||||
}
|
||||
|
||||
if (!event.ctrlKey) {
|
||||
// Prevent the event from reaching the tldraw library
|
||||
event.stopPropagation();
|
||||
@ -461,6 +475,19 @@ export default function Whiteboard(props) {
|
||||
const newZoom = calculateZoom(slidePosition.viewBoxWidth, slidePosition.viewBoxHeight);
|
||||
tldrawAPI?.setCamera([slidePosition.x, slidePosition.y], newZoom, 'zoomed');
|
||||
}
|
||||
|
||||
const camera = tldrawAPI?.getPageState()?.camera;
|
||||
if (isPresenter && slidePosition && camera) {
|
||||
const zoomFitSlide = calculateZoom(slidePosition.width, slidePosition.height);
|
||||
const zoomCamera = (zoomFitSlide * zoomValue) / HUNDRED_PERCENT;
|
||||
let zoomToolbar = Math.round(
|
||||
((HUNDRED_PERCENT * camera.zoom) / zoomFitSlide) * 100,
|
||||
) / 100;
|
||||
if ((zoom !== zoomToolbar) && (curPageId && curPageId !== prevPageId)) {
|
||||
setZoom(zoomToolbar);
|
||||
zoomChanger(zoomToolbar);
|
||||
}
|
||||
}
|
||||
}, [curPageId, slidePosition]);
|
||||
|
||||
// update zoom according to toolbar
|
||||
@ -612,6 +639,11 @@ export default function Whiteboard(props) {
|
||||
tldrawAPI?.selectAll();
|
||||
}
|
||||
break;
|
||||
case KEY_CODES.ARROW_DOWN:
|
||||
case KEY_CODES.ARROW_UP:
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
break;
|
||||
default:
|
||||
}
|
||||
};
|
||||
@ -761,11 +793,6 @@ export default function Whiteboard(props) {
|
||||
camera.point[1] = 0;
|
||||
}
|
||||
|
||||
if (camera.point[0] === 0 && camera.point[1] === 0) {
|
||||
const newZoom = calculateZoom(slidePosition.viewBoxWidth, slidePosition.viewBoxHeight);
|
||||
e?.setCamera([camera.point[0], camera.point[1]], newZoom);
|
||||
}
|
||||
|
||||
const zoomFitSlide = calculateZoom(slidePosition.width, slidePosition.height);
|
||||
if (camera.zoom < zoomFitSlide) {
|
||||
camera.zoom = zoomFitSlide;
|
||||
|
@ -80,5 +80,6 @@ fpm -s dir -C ./staging -n $PACKAGE \
|
||||
--after-remove after-remove.sh \
|
||||
--description "The EtherPad Lite components for BigBlueButton" \
|
||||
$DIRECTORIES \
|
||||
$OPTS
|
||||
$OPTS \
|
||||
-d 'nodejs (>= 18)' -d 'nodejs (<< 20)'
|
||||
|
||||
|
@ -43,5 +43,6 @@ fpm -s dir -C ./staging -n $PACKAGE \
|
||||
--before-remove before-remove.sh \
|
||||
--description "BigBlueButton Export Annotations" \
|
||||
$DIRECTORIES \
|
||||
$OPTS
|
||||
$OPTS \
|
||||
-d 'nodejs (>= 18)' -d 'nodejs (<< 20)'
|
||||
|
||||
|
@ -38,5 +38,6 @@ fpm -s dir -C ./staging -n $PACKAGE \
|
||||
--before-remove before-remove.sh \
|
||||
--description "BigBlueButton Pads" \
|
||||
$DIRECTORIES \
|
||||
$OPTS
|
||||
$OPTS \
|
||||
-d 'nodejs (>= 18)' -d 'nodejs (<< 20)'
|
||||
|
||||
|
@ -46,4 +46,5 @@ fpm -s dir -C ./staging -n $PACKAGE \
|
||||
--description "BigBlueButton Webhooks" \
|
||||
$DIRECTORIES \
|
||||
$OPTS \
|
||||
-d 'yq (>= 3)' -d 'yq (<< 4)'
|
||||
-d 'yq (>= 3)' -d 'yq (<< 4)' \
|
||||
-d 'nodejs (>= 18)' -d 'nodejs (<< 20)'
|
||||
|
@ -64,4 +64,5 @@ fpm -s dir -C ./staging -n $PACKAGE \
|
||||
--description "BigBlueButton WebRTC SFU" \
|
||||
$DIRECTORIES \
|
||||
$OPTS \
|
||||
-d 'yq (>= 3)' -d 'yq (<< 4)'
|
||||
-d 'yq (>= 3)' -d 'yq (<< 4)' \
|
||||
-d 'nodejs (>= 18)' -d 'nodejs (<< 20)'
|
||||
|
@ -131,6 +131,7 @@ Under the hood, BigBlueButton 2.7 installs on Ubuntu 20.04 64-bit, and the follo
|
||||
- React 18
|
||||
- NodeJS 18 (up from 16) for `bbb-pads`, `bbb-export-annotations`, `bbb-webrtc-sfu`, `bbb-etherpad`, `bbb-webhooks`
|
||||
- Java 17 (up from 11) for `bbb-common-message`, `bbb-common-web`, `bigbluebutton-web`, `akka-bbb-apps`, `bbb-fsesl-client`, and `akka-bbb-fsesl`
|
||||
- Meteor 2.13
|
||||
- Grails 5.3.2
|
||||
- GORM 7.3.1
|
||||
- Groovy 3.0.11
|
||||
|
Loading…
Reference in New Issue
Block a user