Design of the PanoTour Editor

Overview

The editor keeps a copy of the PanoTourSettings (config dictionary) as a global variable. The PanoTourSettings are used to setup the PanoTourViewer and is modifed as needed to implement editing features.

 

 

Design

  1. When the user changes the HotSpotType in the HotSpotSettingsPanel:
    1. HotSpotTypeChanged()
      1. SetSelectedHotSpotValuesToGUI()
  2. When the user selects a HotSpot:
    1. SelectedHotSpot set to the array index or the selected hot spot
    2. SetSelectedHotSpotTypeToGUI()
      1. HotSpotTypeChanged()
        1. SetSelectedHotSpotValuesToGUI()
  3. When the user clicks in the pano:
    1. PanoramaMouseDown()
      1. if a HotSpot was selected
        1. Sets SelectedHotSpot
        2. if the left mouse button was pressed sets DraggingHotSpot=true
        3. if the right mouse button wa pressed, adds a drop down menu to delete the HotSpot
    2. PanoramaMouseMove()
      1. If there is a SelectedHotSpot and we are Dragging,
        1. Updates the Pitch and Yaw in the current HotSpot
    3. PanoramaMouseUp(TheEvent)
      1. If there is a SelectedHotSpot and we are Dragging,
        1. UpdateViewerWithoutChangingOrientation();
        2. Dragging=false

 

Functions

GUI Functions

ChangeDisplayedPanel(PanelID)

UpdateSettingsAndViewerWithoutChangingOrientation()

HotSpot Functions

HotSpotTypeChanged() - updates controls on HotSpotSettingsPanel, called when HotSpotType changes in GUI or when SelectedHotSpot changes

HotSpotNew()

UpdateHotSpotSettingsFromGUI()

UpdateSelectedHotSpotToGUI()

Scene GUI Functions

UpdateSceneFromGUI()

UpdateSceneToGUI(TheSceneName)

Scene List Functions

UpdateSceneListToGUI()

 

PanoTourFile Functions

SavePanoTourToFile() - save the PanoTour to a file. There is no load function because we can load the js file directly

 

PanoTour Functions

UpdateThePanoViewerFromSettings() - destroys any existing PaneViewer and copies the current PanoTour settings to a new PanoViewer

UpdatePanoTourSettingsToGUI()

UpdatePanoTourSettingsFromGUI()

Mouse Event Handlers

PanoramaMouseDown(TheEvent)

PanoramaMouseMove(TheEvent)

PanoramaMouseUp(TheEvent)

Menu Event Handlers

DoEditing() - Called to change from editing mode to regular mode

Setup Functions

OnLoad()