Index: lams_central/src/flash/org/lamsfoundation/lams/authoring/cv/Canvas.as =================================================================== diff -u -r7a985716f68f51f9e7bec507470513b4783eafa4 -rad1d3440072fec89bef0f6878e4b8f5b8e2c49c9 --- lams_central/src/flash/org/lamsfoundation/lams/authoring/cv/Canvas.as (.../Canvas.as) (revision 7a985716f68f51f9e7bec507470513b4783eafa4) +++ lams_central/src/flash/org/lamsfoundation/lams/authoring/cv/Canvas.as (.../Canvas.as) (revision ad1d3440072fec89bef0f6878e4b8f5b8e2c49c9) @@ -1,4 +1,4 @@ -import org.lamsfoundation.lams.authoring.cv.* +import org.lamsfoundation.lams.authoring.cv.* import org.lamsfoundation.lams.authoring.tk.* import org.lamsfoundation.lams.common.util.* import org.lamsfoundation.lams.authoring.* @@ -497,16 +497,49 @@ } } + + /** + * Called from the toolbar usually - starts or stops the gate tool + * @usage + * @return + */ + public function toggleGroupTool():Void{ + var c:String = Cursor.getCurrentCursor(); + if(c==Application.C_GROUP){ + stopGroupTool(); + }else{ + startGroupTool(); + } + } public function toggleGateTool():Void{ - var c = Cursor.getCurrentCursor(); + var c:String = Cursor.getCurrentCursor(); if(c==Application.C_GATE){ stopGateTool(); }else{ startGateTool(); } } + public function toggleOptionalActivity():Void{ + var c:String = Cursor.getCurrentCursor(); + if(c==Application.C_OPTIONAL){ + stopOptionalActivity(); + }else{ + startOptionalActivity(); + } + } + + public function toggleTransitionTool():Void{ + var c:String = Cursor.getCurrentCursor(); + if(c==Application.C_TRANSITION){ + stopTransitionTool(); + }else{ + startTransitionTool(); + } + } + + public function startGateTool(){ Debugger.log('Starting gate tool',Debugger.GEN,'startGateTool','Canvas'); Cursor.showCursor(Application.C_GATE); @@ -519,14 +552,7 @@ canvasModel.activeTool = null; } - public function toggleOptionalActivity():Void{ - var c = Cursor.getCurrentCursor(); - if(c==Application.C_OPTIONAL){ - startOptionalActivity(); - }else{ - stopOptionalActivity(); - } - } + public function startOptionalActivity(){ Debugger.log('Starting Optioanl Activity',Debugger.GEN,'startOptionalActivity','Canvas'); Cursor.showCursor(Application.C_OPTIONAL); @@ -579,19 +605,7 @@ } } - /** - * Called from the toolbar usually - starts or stops the gate tool - * @usage - * @return - */ - public function toggleGroupTool():Void{ - var c = Cursor.getCurrentCursor(); - if(c==Application.C_GROUP){ - stopGroupTool(); - }else{ - startGroupTool(); - } - } + public function startGroupTool(){ Debugger.log('Starting group tool',Debugger.GEN,'startGateTool','Canvas'); Cursor.showCursor(Application.C_GROUP); @@ -605,16 +619,6 @@ } - public function toggleTransitionTool():Void{ - var c = Cursor.getCurrentCursor(); - if(c==Application.C_TRANSITION){ - stopTransitionTool(); - }else{ - startTransitionTool(); - } - } - - /** * Called by the top menu bar and the tool bar to start the transition tool, switches cursor. * @usage