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.
- PaneViewer - the configuration of the pano tour when it is loaded into Panellum
- PanoTour - the JavaScript dictionary containing the PanoTour configrutaion settings
- Scene - a scene displayed in the browser with hotspots
- HotSpots
- scene
- info - URL or text
- link
- PanoTour?
- 2DMap?
- Video?
- Image?
Design
- When the user changes the HotSpotType in the HotSpotSettingsPanel:
- HotSpotTypeChanged()
- SetSelectedHotSpotValuesToGUI()
- When the user selects a HotSpot:
- SelectedHotSpot set to the array index or the selected hot spot
- SetSelectedHotSpotTypeToGUI()
- HotSpotTypeChanged()
- SetSelectedHotSpotValuesToGUI()
- When the user clicks in the pano:
- PanoramaMouseDown()
- if a HotSpot was selected
- Sets SelectedHotSpot
- if the left mouse button was pressed sets DraggingHotSpot=true
- if the right mouse button wa pressed, adds a drop down menu to delete the HotSpot
- PanoramaMouseMove()
- If there is a SelectedHotSpot and we are Dragging,
- Updates the Pitch and Yaw in the current HotSpot
- PanoramaMouseUp(TheEvent)
- If there is a SelectedHotSpot and we are Dragging,
- UpdateViewerWithoutChangingOrientation();
- 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
- Editing Mode:
- Can drag screen
- Clicking on hotspots brings up settings panels
- Hotspot action is disabled (convert type to info?)
- Regular mode:
- Can drag screen
- Clicking on hotspots that have a sceneId jumps to that scene
Setup Functions
OnLoad()