ScaffoldVuer
A vue component of the scaffold viewer.
Props
Name | Description | Type | Required | Default |
---|---|---|---|---|
annotationSidebar | The option to show annotation information in sidebar | boolean | false | false |
url | URL of the zincjs metadata. This value will be ignored if a valid state prop is also provided. If the url needs to be updated with state present, please use the setURL method. | string | false | "" |
showColourPicker | Show the colour control of set to true. | boolean | false | false |
displayUI | Flag to show/hide the UI. | boolean | false | true |
displayAtStartUp | Display all graphics at start. This setting only works when traditional is set to false. | boolean | false | true |
helpMode | Use for toggling the help tooltips. | boolean | false | false |
helpModeActiveItem | The active item index of help mode. | number | false | 0 |
helpModeDialog | The option to use helpModeDialog. On default, false , clicking help will show all tooltips. If true , clicking help will show the help-mode-dialog. | boolean | false | false |
helpModeLastItem | The last item of help mode. | boolean | false | false |
helpModeInitialIndex | The initial index number for help mode tooltips. Set negative (e.g. -1) if there are other tooltips outside of hoverVisibilities . | number | false | 0 |
displayWarning | Use for show/display beta warning icon. | boolean | false | true |
warningMessage | Warning message for the hovered over text on the warning icon. | string | false | "Beta feature - under active development" |
displayLatestChanges | - | boolean | false | false |
latestChangesMessage | - | string | false | "New feature - Local search is now available" |
displayMarkers | Show/hide pickable markers for regions. | boolean | false | false |
markerCluster | Display adjacent markers with a cluster marker. | boolean | false | false |
markerLabels | GroupName to value pair. The value can be a single number or and object in the following form: { number: Number, imgURL: String } When imgURL is specified, scaffoldvuer will attempt to render the image in imgURL as marker instead. | object | false | {} |
displayMinimap | Show/hide minimap. | boolean | false | false |
format | Format of the input URL | string | false | "metadata" |
minimapSettings | Settings for minimap position, size and alignment. | object | false | { x_offset: 16, y_offset: 16, width: 128, height: 128, align: "top-right", } |
enableOpenMapUI | Flag to determine rather the open map UI icon and popup should be shown or not. | boolean | false | false |
openMapOptions | This array populate the the openMapOptions popup. Each entry contains a pair of display and key. | array | false | [ { display: "Open AC Map", key: "AC" }, { display: "Open FC Map", key: "FC" }, { display: "Open 3D Human Map", key: "3D" }, ] |
state | State containing state of the scaffold. | object | false | undefined |
region | Optional prop for the name of the region to focus on, this option is ignored if state or viewURL is also provided. | string | false | "" |
viewURL | Optional prop for an URL of containing information of a viewport. This option is ignored if state is also provided. It will use the provided URL as base if a relative parth is provided. | string | false | "" |
render | Settings for turning on/off rendering | boolean | false | true |
flatmapAPI | Specify the endpoint of the flatmap server. This is used by annotation service included in third party flatmapvuer library. | string | false | "https://mapcore-demo.org/current/flatmap/v3/" |
enableLocalAnnotations | Enable local annotations | boolean | false | false |
Events
Event Name | Description | Parameters |
---|---|---|
open-map | - | - |
timeChanged | Emit when time in the current scene has changed | "Current time in scene" |
annotation-open | - | - |
annotation-close | - | - |
zinc-object-added | Emit when a new object is added to the scene | "The object added to the sceene" |
userPrimitivesUpdated | - | - |
scaffold-selected | Emit when an object is selected | "Identifier of selected objects" |
scaffold-highlighted | Emit when an object is highlighted | "Identifier of selected objects" |
help-mode-last-item | This event is emitted when the tooltips in help mode reach the last item. | - |
shown-tooltip | This event is emitted after a tooltip in Flatmap is shown. | - |
on-ready | Emit when all objects have been loaded | - |
scaffold-navigated | Emit when the scene has been transformed due to navigation, only triggered during syncControl mode | "Information on the navigation" |
Methods
Method | Description | Parameters |
---|---|---|
addZincObject | Call this to manually add a zinc object into the current scene. This will subsequently trigger a zincObjectAdded | "ZincObject object to be added" |
captureScreenshot | Function for capturing a screenshot of the current rendering. | "filename given to the screenshot." |
clearScene | Function to clear current scene, the tree controls and the search index. | - |
addAndEditAnnotations | Add and edit local annotations | region , group , zincObject , comment |
primitivesUpdated | Callback for when primitives have been update using primitive controls. This is only called from callback. | object |
confirmCreate | Confirm creation of new primitive. This is only called from callback. | payload |
fitWindow | Function to reset the view to default. Also called when the associated button is pressed. | - |
zoomIn | Function to zoom in. Also called when the associated button is pressed. | - |
zoomOut | Function to zoom out. Also called when the associated button is pressed. | - |
speedChanged | Function to change the current play speed. | speed |
stopFreeSpin | Function used to stop the free spin | - |
findObjectsWithGroupName | Return a list of obejcts with the provided name. | "Group name to search." |
toggleDrawing | Switch active drawing type | type icon |
toggleDrawingBox | Toggle the drawing box which aid the drawing | - |
viewRegion | Find and and zoom into objects with the provided list of names. | "List of names" |
getRendererInfo | Return renderer information | - |
freeSpin | Function used to rotate the scene. Also called when the associated button is pressed. | - |
getCoordinatesOfSelected | Get the coordinates of the current selected region. | - |
getDynamicSelectedCoordinates | Return an object containing the window coordinates of the current selected region which will be updated after each render loop. | - |
play | Start the animation. | "flag to turn the animation on/off" |
setHelpMode | Function to toggle on/off overlay help. | helpMode |
hideRegionTooltip | Hide the tooltip | - |
setMarkerModeWithAnnotations | Set the marker modes for objects specified by the list of annotations | annotations mode |
search | Search a object and display the tooltip | "text to search across" "toggle the tooltip if this is set" |
fetchSuggestions | Get the list of suggested terms based on the provided term. This can be used for autocomplete. | term |
getState | Function used for getting the current states of the scene. This exported states can be imported using the importStates method. | - |
setState | Function used for importing the states of the scene. This exported states can be imported using the read states method. | state |
exportGLTF | export current scene in GLTF. | "Return in binary form when set to true" |
getLocalAnnotations | Return a copy of the local annotations list. This list is used for storing user created annotation when enableLocalAnnotations is set to true. | - |
importLocalAnnotations | Import local annotations. The annotations will only be imported when enableLocalAnnotations is set to true; | annotationsList |
setURLAndState | Function used for reading in new scaffold metadata and a custom viewport. This function will ignore the state prop and read in the new url. | newValue state |
setURL | Function used for reading in new scaffold metadata. This function will ignore the state prop and read in the new url. | newValue |
forceResize | Force the renderer to resize | - |