diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/present/ui/views/SlideView.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/present/ui/views/SlideView.mxml index de70c3cf5d..bc1bf231cb 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/present/ui/views/SlideView.mxml +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/present/ui/views/SlideView.mxml @@ -178,11 +178,13 @@ with BigBlueButton; if not, see . var deltaCanvasMouseY:Number = this.mouseY - prevMouseY; prevMouseX = this.mouseX; prevMouseY = this.mouseY; - slideModel.onMove(deltaCanvasMouseX, deltaCanvasMouseY); - slideModel.printViewedRegion(); - slideModel.displayPresenterView(); - fitSlideToLoader(); - notifyOthersOfZoomEvent(); + var xyChange:Boolean = slideModel.onMove(deltaCanvasMouseX, deltaCanvasMouseY); + if (xyChange) { + slideModel.printViewedRegion(); + slideModel.displayPresenterView(); + fitSlideToLoader(); + notifyOthersOfZoomEvent(); + } } /** @@ -232,12 +234,13 @@ with BigBlueButton; if not, see . * Triggered when the presenter uses the mouse wheel to zoom in/out of the slide. */ private function onMouseWheelZoomEvent(e:MouseEvent):void { + var newZoomPercentage:Number = zoomPercentage; if (presenterIsZoomingOut(e.delta)) { - zoomPercentage -= ZOOM_STEP; + newZoomPercentage -= ZOOM_STEP; } else { - zoomPercentage += ZOOM_STEP; + newZoomPercentage += ZOOM_STEP; } - zoomSlide(zoomPercentage, this.mouseX, this.mouseY); + zoomSlide(newZoomPercentage, this.mouseX, this.mouseY); } public function switchToFitToPage(ftp:Boolean):void { @@ -251,17 +254,21 @@ with BigBlueButton; if not, see . } private function zoomSlide(zoom:Number, mouseX:Number, mouseY:Number):void { - zoomPercentage = zoom; - if (zoomPercentage <= SlideViewModel.HUNDRED_PERCENT) { - zoomPercentage = SlideViewModel.HUNDRED_PERCENT; - } else if (zoomPercentage >= SlideViewModel.MAX_ZOOM_PERCENT) { - zoomPercentage = SlideViewModel.MAX_ZOOM_PERCENT + if (zoom <= SlideViewModel.HUNDRED_PERCENT) { + zoom = SlideViewModel.HUNDRED_PERCENT; + } else if (zoom >= SlideViewModel.MAX_ZOOM_PERCENT) { + zoom = SlideViewModel.MAX_ZOOM_PERCENT + } + + if (zoom != zoomPercentage) { + zoomPercentage = zoom; + + slideModel.onZoom(zoomPercentage, mouseX, mouseY); + slideModel.printViewedRegion(); + slideModel.displayPresenterView(); + fitSlideToLoader(); + notifyOthersOfZoomEvent(); } - slideModel.onZoom(zoomPercentage, mouseX, mouseY); - slideModel.printViewedRegion(); - slideModel.displayPresenterView(); - fitSlideToLoader(); - notifyOthersOfZoomEvent(); } private function notifyOthersOfZoomEvent():void { diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/present/ui/views/models/SlideViewModel.as b/bigbluebutton-client/src/org/bigbluebutton/modules/present/ui/views/models/SlideViewModel.as old mode 100644 new mode 100755 index 5ae5317df4..c32cacdc17 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/present/ui/views/models/SlideViewModel.as +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/present/ui/views/models/SlideViewModel.as @@ -150,7 +150,7 @@ package org.bigbluebutton.modules.present.ui.views.models _calcPageW = (viewportW/_viewedRegionW) * HUNDRED_PERCENT; _calcPageH = (_pageOrigH/_pageOrigW) * _calcPageW; calcViewedRegion(); - onResizeMove(); + doBoundsValidation(); } } @@ -186,17 +186,27 @@ package org.bigbluebutton.modules.present.ui.views.models } } - private function onResizeMove():void { + private function doBoundsValidation():void { doWidthBoundsDetection(); doHeightBoundsDetection(); } - public function onMove(deltaX:Number, deltaY:Number):void { + /** Returns whether or not the page actually moved */ + public function onMove(deltaX:Number, deltaY:Number):Boolean { + var oldX:Number = _calcPageX; + var oldY:Number = _calcPageY; + _calcPageX += deltaX / MYSTERY_NUM; _calcPageY += deltaY / MYSTERY_NUM; - onResizeMove(); - calcViewedRegion(); + doBoundsValidation(); + + if (oldX != _calcPageX || oldY != _calcPageY) { + calcViewedRegion(); + return true; + } else { + return false; + } } public function calculateViewportSize():void {