From cb161ac118ee439e0e4d01034ddd1c064faa0138 Mon Sep 17 00:00:00 2001 From: Richard Alam Date: Mon, 13 Feb 2017 20:43:04 +0000 Subject: [PATCH] - when we get invalid coordinate for presentation slide, change coordinate so it falls within bounds --- .../scala/org/bigbluebutton/core/apps/PresentationApp.scala | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/PresentationApp.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/PresentationApp.scala index 3efc4b9c69..7985bec496 100755 --- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/PresentationApp.scala +++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/PresentationApp.scala @@ -88,6 +88,12 @@ trait PresentationApp { } def handleResizeAndMoveSlide(msg: ResizeAndMoveSlide) { + // Force coordinate that are out-of-bounds inside valid values + val xOffset = if (msg.xOffset <= 0) msg.xOffset else 0 + val yOffset = if (msg.yOffset <= 0) msg.yOffset else 0 + val width = if (msg.widthRatio <= 100) msg.widthRatio else 100 + val height = if (msg.heightRatio <= 100) msg.heightRatio else 100 + val page = presModel.resizePage(msg.xOffset, msg.yOffset, msg.widthRatio, msg.heightRatio); page foreach (p => outGW.send(new ResizeAndMoveSlideOutMsg(mProps.meetingID, mProps.recorded, p)))