diff --git a/bigbluebutton-html5/imports/ui/components/whiteboard/whiteboard-overlay/component.jsx b/bigbluebutton-html5/imports/ui/components/whiteboard/whiteboard-overlay/component.jsx index 2f0730b654..1d8fa5a9d7 100755 --- a/bigbluebutton-html5/imports/ui/components/whiteboard/whiteboard-overlay/component.jsx +++ b/bigbluebutton-html5/imports/ui/components/whiteboard/whiteboard-overlay/component.jsx @@ -38,6 +38,7 @@ export default class WhiteboardOverlay extends Component { this.checkIfOutOfBounds = this.checkIfOutOfBounds.bind(this); this.svgCoordinateToPercentages = this.svgCoordinateToPercentages.bind(this); this.normalizeThickness = this.normalizeThickness.bind(this); + this.normalizeFont = this.normalizeFont.bind(this); } @@ -71,6 +72,10 @@ export default class WhiteboardOverlay extends Component { return (thickness * 100) / this.props.physicalSlideWidth; } + normalizeFont(fontSize) { + return (fontSize * 100) / this.props.physicalSlideHeight; + } + generateNewShapeId() { this.count = this.count + 1; this.currentShapeId = `${this.props.userId}-${this.count}-${new Date().getTime()}`; @@ -130,6 +135,7 @@ export default class WhiteboardOverlay extends Component { getCurrentShapeId: this.getCurrentShapeId, generateNewShapeId: this.generateNewShapeId, normalizeThickness: this.normalizeThickness, + normalizeFont: this.normalizeFont, sendAnnotation, resetTextShapeSession, setTextShapeActiveId, diff --git a/bigbluebutton-html5/imports/ui/components/whiteboard/whiteboard-overlay/text-draw-listener/component.jsx b/bigbluebutton-html5/imports/ui/components/whiteboard/whiteboard-overlay/text-draw-listener/component.jsx index 2b7aae774b..eb4bcb4280 100755 --- a/bigbluebutton-html5/imports/ui/components/whiteboard/whiteboard-overlay/text-draw-listener/component.jsx +++ b/bigbluebutton-html5/imports/ui/components/whiteboard/whiteboard-overlay/text-draw-listener/component.jsx @@ -242,7 +242,7 @@ export default class TextDrawListener extends Component { } handleDrawText(startPoint, width, height, status, id, text) { - const { normalizeThickness, sendAnnotation } = this.props.actions; + const { normalizeFont, sendAnnotation } = this.props.actions; const annotation = { id, @@ -252,7 +252,7 @@ export default class TextDrawListener extends Component { x: startPoint.x, // left corner y: startPoint.y, // left corner fontColor: this.props.drawSettings.color, - calcedFontSize: normalizeThickness(this.props.drawSettings.textFontSize), // fontsize + calcedFontSize: normalizeFont(this.props.drawSettings.textFontSize), // fontsize textBoxWidth: width, // width text, textBoxHeight: height, // height