Declaring the currentWorkPanel to avoid creating a global variable.

Found this when converting it to angular...