Index: lams_common/src/flash/org/lamsfoundation/lams/common/ws/WorkspaceView.as =================================================================== diff -u -re38f3487b15a20454afa1f5032fab7396d74a386 -r7d22ffccabfaa30a3c260d0efac76e3663719967 --- lams_common/src/flash/org/lamsfoundation/lams/common/ws/WorkspaceView.as (.../WorkspaceView.as) (revision e38f3487b15a20454afa1f5032fab7396d74a386) +++ lams_common/src/flash/org/lamsfoundation/lams/common/ws/WorkspaceView.as (.../WorkspaceView.as) (revision 7d22ffccabfaa30a3c260d0efac76e3663719967) @@ -23,25 +23,7 @@ // Invoke superconstructor, which sets up MVC relationships. // This view has no user inputs, so no controller is required. super (m, c); - // - createWorkspace (target_mc,depth,x,y,w,h); } - /* - * Creates workspace movie clip - * - * @param target_mc The clip in which to create the movie clip. - * @param depth The depth at which to create the movie clip. - * @param x The movie clip's horizontal position in target. - * @param y The movie clip's vertical position in target. - */ - public function createWorkspace (target_mc:MovieClip,depth:Number,x:Number,y:Number,w:Number,h:Number):Void { - trace(target_mc); - _workspace_mc = target_mc.createEmptyMovieClip('workspace_mc',depth); - _workspace_mc._x = x; - _workspace_mc._y = y; - _workspace_mc.bg_mc._width = w; - _workspace_mc.bg_mc._height = h; - } /* * Updates state of the canvas, called by Canvas Model @@ -54,10 +36,16 @@ } /** - * Create a popup for the workspace + * Create a popup dialog containing workspace + * @param pos - Position, either 'centre' or an object containing x + y coordinates */ - public function createWorkspacePopup(w:Number,h:Number){ - var popup = PopUpManager.createPopUp(Application.root, LFWindow, true,{title:Dictionary.getValue(0),closeButton:true,scrollContentPath:'workspaceDialog',_x:200,_y:200}); - popup.setSize(w,h); + public function createWorkspacePopup(pos:Object){ + //Check to see whether this should be a centered or positioned dialog + if(typeof(pos)=='string'){ + var popup = PopUpManager.createPopUp(Application.root, LFWindow, true,{title:Dictionary.getValue(0),closeButton:true,scrollContentPath:'workspaceDialog'}); + //popup.centre(); + } else { + var popup = PopUpManager.createPopUp(Application.root, LFWindow, true,{title:Dictionary.getValue(0),closeButton:true,scrollContentPath:'workspaceDialog',_x:pos.x,_y:pos.y}); + } } }