From 825b39df1b464cb8fd51faccad0040d35bdcd176 Mon Sep 17 00:00:00 2001 From: kreismann Date: Mon, 18 Jul 2016 18:05:19 -0300 Subject: [PATCH] Updating coordinates and resizing new annotations. Resolving the issues from previous commit. --- .../view/components/DesktopViewWindow.mxml | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/deskshare/view/components/DesktopViewWindow.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/deskshare/view/components/DesktopViewWindow.mxml index afa489f508..db6ee858ee 100644 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/deskshare/view/components/DesktopViewWindow.mxml +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/deskshare/view/components/DesktopViewWindow.mxml @@ -88,6 +88,12 @@ with BigBlueButton; if not, see . [Bindable] private var dsOptions:DeskshareOptions; private var whiteboardCanvasHolder:Canvas = new Canvas(); + private var fullScreen:Boolean = false; + + private var fullScreenWidth:Number = 1; + private var fullScreenHeight:Number = 1; + private var windowedWidth:Number = 1; + private var windowedHeight:Number = 1; private function init():void{ dsOptions = new DeskshareOptions(); @@ -188,6 +194,12 @@ with BigBlueButton; if not, see . this.whiteboardCanvasHolder.rawChildren.getChildAt(i).height = this.whiteboardCanvasHolder.rawChildren.getChildAt(i).height * heightResizeRatio; + + this.whiteboardCanvasHolder.rawChildren.getChildAt(i).x = + this.whiteboardCanvasHolder.rawChildren.getChildAt(i).x * widthResizeRatio; + + this.whiteboardCanvasHolder.rawChildren.getChildAt(i).y = + this.whiteboardCanvasHolder.rawChildren.getChildAt(i).y * heightResizeRatio; } } @@ -257,6 +269,10 @@ with BigBlueButton; if not, see . video.y = 0; video.x = (videoHolder.width - video.width) / 2; } + + fullScreen = false; + windowedWidth = video.width; + windowedHeight = video.height; } /** @@ -270,6 +286,10 @@ with BigBlueButton; if not, see . video.height = videoHeight; video.x = Math.max(videoHolder.width - videoWidth, 0); video.y = Math.max(videoHolder.height - videoHeight, 0); + + fullScreen = true; + fullScreenWidth = video.width; + fullScreenHeight = video.height; } private function determineHowToDisplayVideo():void { @@ -300,6 +320,12 @@ with BigBlueButton; if not, see . /** Inherited from IBbbCanvas*/ public function addRawChild(child:DisplayObject):void{ + if(fullScreen) { + child.width = child.width * (fullScreenWidth/windowedWidth); + child.x = child.x * (fullScreenWidth/windowedWidth); + child.height = child.height * (fullScreenHeight/windowedHeight); + child.y = child.y * (fullScreenHeight/windowedHeight); + } this.whiteboardCanvasHolder.rawChildren.addChild(child); }