Options
All
  • Public
Menu

Class HTMLViewportAdaptors

Hierarchy

  • HTMLViewportAdaptors

Index

Constructors

Properties

Methods

Constructors

constructor

Properties

Protected allowViewportEvents

allowViewportEvents: boolean = true

Protected angleAdaptor

angleAdaptor: AngleAnnotationAdaptor = null

Protected annotationEditAdaptor

annotationEditAdaptor: AnnotationEditInterface = null

Protected annotationMapping

annotationMapping: object

Type declaration

Protected annotationType

annotationType: GraphicType = Fovia.GraphicType.none

Protected autoNavigateAdaptor

autoNavigateAdaptor: AutoNavigateAdaptor = null

Protected circleAdaptor

circleAdaptor: CircleAnnotationAdaptor = null

Protected currentDoubleTapTouchAdaptor

currentDoubleTapTouchAdaptor: any = null

Protected currentMouseAdaptor

currentMouseAdaptor: any

Protected currentMouseMoveAdaptorOverride

currentMouseMoveAdaptorOverride: any

Protected currentSingleFingerTouchAdaptor

currentSingleFingerTouchAdaptor: any = null

Protected currentSingleTapTouchAdaptor

currentSingleTapTouchAdaptor: any = null

Protected currentThreeFingerTouchAdaptor

currentThreeFingerTouchAdaptor: any = null

Protected currentTwoFingerTouchAdaptor

currentTwoFingerTouchAdaptor: any = null

Protected ellipseAdaptor

ellipseAdaptor: EllipseAnnotationAdaptor = null

Protected emptyAdaptor

emptyAdaptor: EmptyAdaptor = null

Protected emptyAdaptor2d

emptyAdaptor2d: EmptyAdaptor2D = null

Protected flip2DAdaptor

flip2DAdaptor: NativeAdaptor2D

Protected globalMouseHandlerActive

globalMouseHandlerActive: boolean = true

Protected globalMouseMoveListener

globalMouseMoveListener: any

Protected globalMouseUpListener

globalMouseUpListener: any

Protected htmlViewport

htmlViewport: HTMLViewport

Protected isAnnotationEdit

isAnnotationEdit: boolean = false

Protected keyPressListener

keyPressListener: any

Protected keyUpListener

keyUpListener: any

Protected lineAdaptor

lineAdaptor: LineAnnotationAdaptor = null

Protected manualNavigateAdaptor

manualNavigateAdaptor: ManualNavigateAdaptor = null

Protected mouseDown

mouseDown: boolean = false

Protected mouseDownListener

mouseDownListener: any

Protected mouseEnterListener

mouseEnterListener: any

Protected mouseLeaveListener

mouseLeaveListener: any

Protected mouseMapping

mouseMapping: object

Type declaration

Protected mouseMoveListener

mouseMoveListener: any

Protected mouseUpListener

mouseUpListener: any

Protected mouseWheelListener

mouseWheelListener: any

Protected nativePanAdaptor

nativePanAdaptor: NativeAdaptor = null

Protected nativeRotateAdaptor

nativeRotateAdaptor: NativeAdaptor = null

Protected nativeZoomAdaptor

nativeZoomAdaptor: NativeAdaptor = null

Protected nativeZoomAroundPointAdaptor

nativeZoomAroundPointAdaptor: NativeAdaptor = null

Protected overrideKeyCharacter

overrideKeyCharacter: any = null

Protected overrideMouseAdaptor

overrideMouseAdaptor: MouseAdaptorInterface = null

Protected overrideMouseMapping

overrideMouseMapping: object

Type declaration

Protected overrideTouchAdaptor

overrideTouchAdaptor: TouchAdaptorInterface = null

Protected page2DAdaptor

page2DAdaptor: NativeAdaptor2D

Protected page2DTouchAdaptor

page2DTouchAdaptor: NativeAdaptorTouch2D

Protected pan2DAdaptor

pan2DAdaptor: NativeAdaptor2D

Protected panZoom2DTouchAdaptor

panZoom2DTouchAdaptor: PanZoomNativeAdaptorTouch2D

Protected pointAdaptor

pointAdaptor: PointAnnotationAdaptor = null

Protected processingAnnotationAdaptor

processingAnnotationAdaptor: boolean = false

Protected processingKeyboardAdaptor

processingKeyboardAdaptor: boolean = false

Protected processingMouseAdaptor

processingMouseAdaptor: boolean = false

Protected rotate2DAdaptor

rotate2DAdaptor: NativeAdaptor2D

Protected rotateMouseAdaptor

rotateMouseAdaptor: RotateMouseAdaptor = null

Protected rotateTouchAdaptor

rotateTouchAdaptor: RotateTouchAdaptor = null

Protected scroll2DAdaptor

scroll2DAdaptor: NativeAdaptor2D

Protected scrollAdaptor

scrollAdaptor: ScrollMouseAdaptor = null

Protected scrollAdaptorAxial

scrollAdaptorAxial: ScrollMouseAdaptorAxial = null

Protected scrollAdaptorCoronal

scrollAdaptorCoronal: ScrollMouseAdaptorCoronal = null

Protected scrollAdaptorSagittal

scrollAdaptorSagittal: ScrollMouseAdaptorSagittal = null

Protected scrollTouchAdaptor

scrollTouchAdaptor: ScrollTouchAdaptor = null

Protected scrollTouchAdaptorAxial

scrollTouchAdaptorAxial: ScrollTouchAdaptorAxial = null

Protected scrollTouchAdaptorCoronal

scrollTouchAdaptorCoronal: ScrollTouchAdaptorCoronal = null

Protected scrollTouchAdaptorSagittal

scrollTouchAdaptorSagittal: ScrollTouchAdaptorSagittal = null

Protected surfaceRotateMouseAdaptor

surfaceRotateMouseAdaptor: SurfaceRotateMouseAdaptor = null

Protected textAdaptor

textAdaptor: TextAnnotationAdaptor = null

Protected touchEndListener

touchEndListener: any

Protected touchMapping

touchMapping: object

Type declaration

Protected touchMoveListener

touchMoveListener: any

Protected touchStartListener

touchStartListener: any

Protected touchStarted

touchStarted: boolean[] = new Array(3)

Protected virtualTrackballAdaptor

virtualTrackballAdaptor: VirtualTrackballAdaptor = null

Protected voxelValueAdaptor

voxelValueAdaptor: VoxelValueAdaptor = null

Protected windowLevel2DAdaptor

windowLevel2DAdaptor: NativeAdaptor2D

Protected windowLevel2DTouchAdaptor

windowLevel2DTouchAdaptor: NativeAdaptorTouch2D

Protected windowLevelAdaptor

windowLevelAdaptor: WindowLevelAdaptor = null

Protected windowLevelTouchAdaptor

windowLevelTouchAdaptor: WindowLevelTouchAdaptor = null

Protected zoom2DAdaptor

zoom2DAdaptor: NativeAdaptor2D

Protected zoomPanTouchAdaptor

zoomPanTouchAdaptor: ZoomPanTouchAdaptor = null

Static staticHTMLViewportAdaptor

staticHTMLViewportAdaptor: any = null

Methods

activateAnnotation

  • activateAnnotation(type: GraphicType, isFreeline?: boolean): void
  • Parameters

    • type: GraphicType
    • Default value isFreeline: boolean = false

    Returns void

addHTMLEventListeners

  • addHTMLEventListeners(): void
  • Returns void

allowEventsOnViewport

  • allowEventsOnViewport(flag: boolean): void
  • Set flag to state whether mouse/key events are allowed to perform on the viewport

    Parameters

    • flag: boolean

      (true/false)

    Returns void

changeHTMLCanvasID

  • changeHTMLCanvasID(newHTMLElement: string): void
  • Parameters

    • newHTMLElement: string

    Returns void

clearTouch

  • clearTouch(): void
  • Returns void

Protected createAnnotationKey

  • creates a unique hash key for annotation adapter based on type

    Parameters

    Returns string

Protected createMouseKey

  • creates a unique hash key for the specified mouse adaptor to mouse event mapping

    Parameters

    Returns string

Protected createOverrideMouseKey

  • creates a unique hash key for the specified override mouse adaptor to mouse event mapping

    Parameters

    Returns string

displayAnnotations

  • displayAnnotations(flag: boolean): void
  • Parameters

    • flag: boolean

    Returns void

displayCadMarkings

  • displayCadMarkings(flag: boolean): void
  • Parameters

    • flag: boolean

    Returns void

disposeSummaryDiv

  • disposeSummaryDiv(): void
  • Dispose the summary Div

    Returns void

enableGlobalMouseEvents

  • enableGlobalMouseEvents(globalMouseHandlerActive: boolean): void
  • By default, JavaScript windows only see mosue events within its Canvas element, which means when the mouse moves outside the element, they are no longer tracked. By enabling this option, mouse events outside the HTML element are passed to this adaptor. By default, this is off (to adhere to standard javaScript behavior). In all cases, when a mouseUp occurs outside the active viewport, that event will be passed to the adaptor.

    Parameters

    • globalMouseHandlerActive: boolean

    Returns void

Protected getAnnotationAdaptor

getClassName

  • getClassName(): string
  • Returns string

getSliceInfofromAxisAlignedScrollAdaptors

globalMouseEnterHandler

  • globalMouseEnterHandler(event: MouseEvent): void
  • Parameters

    • event: MouseEvent

    Returns void

globalMouseLeaveHandler

  • globalMouseLeaveHandler(event: MouseEvent): void
  • Parameters

    • event: MouseEvent

    Returns void

globalMouseMoveHandler

  • globalMouseMoveHandler(event: MouseEvent): void
  • globalMouseMoveHandler -- dispatches to the correct mouseMove handler across the entire document

    Parameters

    • event: MouseEvent

    Returns void

globalMouseReleaseHandler

  • globalMouseReleaseHandler(event: MouseEvent): void
  • globalMouseReleaseHandler -- dispatches to the correct mouseUp handler across the entire document

    Parameters

    • event: MouseEvent

    Returns void

initOverrideMouseAdaptor

  • Install a mouse adaptor that is invokved unconditionally for all mouse events. This allow the application to peek at the event, process it, and stop the propagate.

    This is useful when the application is detecting a mouse over event of an annotation or cross-reference lines, and handle that opposed to the current mouse adaptor that would otherwise be triggered.

    Parameters

    Returns void

isAnnotationAdaptorActive

  • isAnnotationAdaptorActive(): boolean
  • Retrun true if annotation adaptor is active, Else false

    Returns boolean

    boolean

isTextAdaptorActive

  • isTextAdaptorActive(): boolean
  • Returns boolean

keyPressHandler

  • keyPressHandler(event: KeyboardEvent): void
  • keyPressHandler -- dispatches to the correct keyPress handler.

    Parameters

    • event: KeyboardEvent

    Returns void

keyUpHandler

  • keyUpHandler(event: KeyboardEvent): void
  • keyUpHandler -- dispatches to the correct keyUp handler.

    Parameters

    • event: KeyboardEvent

    Returns void

mouseDownHandler

  • mouseDownHandler(event: MouseEvent): Promise<void>
  • mouseDownHandler -- dispatches to the correct mouseDown handler. Note, this comes in on a HTML thread, so the HTMLViewport3D reference resides in the the private HTML element.

    Parameters

    • event: MouseEvent

    Returns Promise<void>

mouseMoveHandler

  • mouseMoveHandler(event: MouseEvent): Promise<void>
  • mouseMoveHandler -- dispatches to the correct mouseMove handler. Note, this comes in on a HTML thread, so the HTMLViewport3D reference resides in the the private HTML element.

    Parameters

    • event: MouseEvent

    Returns Promise<void>

mouseReleaseHandler

  • mouseReleaseHandler(event: MouseEvent): void
  • mouseReleaseHandler -- dispatches to the correct mouseRelease handler. Note, this comes in on a HTML thread, so the HTMLViewport3D reference resides in the the private HTML element.

    Parameters

    • event: MouseEvent

    Returns void

mouseWheelHandler

  • mouseWheelHandler(event: MouseEvent): Promise<void>
  • mouseMoveHandler -- dispatches to the correct mouseMove handler. Note, this comes in on a HTML thread, so the HTMLViewport3D reference resides in the the private HTML element.

    Parameters

    • event: MouseEvent

    Returns Promise<void>

postRender

  • postRender(htmlViewport: any, renderParams: any): void
  • Parameters

    • htmlViewport: any
    • renderParams: any

    Returns void

Protected processMouseMove

  • processMouseMove(event: MouseEvent): Promise<void>
  • internal method called to handline any mouseUp events (either directly, or from another handler)

    Parameters

    • event: MouseEvent

    Returns Promise<void>

Protected processMouseReleased

  • processMouseReleased(event: MouseEvent): Promise<void>
  • internal method called to handline any mouseUp events (either directly, or from another handler)

    Parameters

    • event: MouseEvent

    Returns Promise<void>

removeHTMLEventListener

  • removeHTMLEventListener(): void
  • Returns void

reset

  • reset(isSaveText?: boolean): void
  • Parameters

    • Default value isSaveText: boolean = false

    Returns void

Protected resetAnnotationEdit

  • resetAnnotationEdit(): void
  • Returns void

setActiveAnnotationAdaptor

setAnnotationAdaptor

  • setAnnotationAdaptor(type: GraphicType, adaptorInterface: any): void
  • Parameters

    Returns void

setCustomMouseAdaptor

  • Associate a custom mouse adaptor with a given mouse button and keyboard modifier

    Parameters

    Returns void

setCustomTouchAdaptor

  • Associate a custom mouse adaptor with a given mouse button and keyboard modifier

    Parameters

    Returns void

setDefaultAdaptors

  • setDefaultAdaptors(renderType: RenderType): void
  • sets default mouse and touch adaptors

    Parameters

    Returns void

setHTMLViewport

setMouseAdaptor

  • Create a mapping between a mouse event and the specified adaptor

    Parameters

    Returns void

setOverrideKeyCharacter

  • setOverrideKeyCharacter(character: any): void
  • Set the key character for override mouse adaptor

    Parameters

    • character: any

    Returns void

setOverrideMouseAdaptor

  • Install a mouse adaptor that is invokved unconditionally for all mouse events. This allow the application to peek at the event, process it, and stop the propagate.

    This is useful when the application is detecting a mouse over event of an annotation or cross-reference lines, and handle that opposed to the current mouse adaptor that would otherwise be triggered.

    Parameters

    Returns void

setOverrideTouchAdaptor

  • Install a touch adaptor that is invokved unconditionally for all touch events. This allow the application to peek at the event, process it, and stop the propagate.

    This is useful when the application is detecting a touch over event of an annotation or cross-reference lines, and handle that opposed to the current mouse adaptor that would otherwise be triggered.

    Parameters

    Returns void

setTextAdaptorActive

  • setTextAdaptorActive(): void
  • Returns void

setTouchAdaptor

  • map between a touch event and specified adaptor

    Parameters

    Returns void

toggleAnnotationEdit

  • toggleAnnotationEdit(flag: boolean): void
  • Parameters

    • flag: boolean

    Returns void

touchEndHandler

  • touchEndHandler(event: TouchEvent): void
  • touchEndHandler -- dispatches to the correct touchEnd handler. Note, this comes in on a HTML thread, so the HTMLViewport3D reference resides in the the private HTML element.

    Parameters

    • event: TouchEvent

    Returns void

touchMoveHandler

  • touchMoveHandler(event: TouchEvent): void
  • touchMoveHandler -- dispatches to the correct touchMove handler. Note, this comes in on a HTML thread, so the HTMLViewport3D reference resides in the the private HTML element.

    Parameters

    • event: TouchEvent

    Returns void

touchStartHandler

  • touchStartHandler(event: TouchEvent): void
  • touchStartHandler -- dispatches to the correct touchStart handler. Note, this comes in on a HTML thread, so the HTMLViewport3D reference resides in the the private HTML element.

    Parameters

    • event: TouchEvent

    Returns void

Protected use2DAdaptors

  • use2DAdaptors(): boolean
  • Returns boolean

viewportAdjusted

  • viewportAdjusted(event: any): any
  • Parameters

    • event: any

    Returns any