Class HTMLViewportAdaptors

Hierarchy

  • HTMLViewportAdaptors

Index

Constructors

Properties

Methods

Object literals

Constructors

constructor

Properties

Private allowViewportEvents

allowViewportEvents: boolean = true

Private annotationEditAdaptor

annotationEditAdaptor: AnnotationEditAdaptor = null

Private annotationMapping

annotationMapping: object

Type declaration

Private annotationType

annotationType: GraphicType = Fovia.GraphicType.none

Private autoNavigateAdaptor

autoNavigateAdaptor: AutoNavigateAdaptor = null

Private circleAdaptor

circleAdaptor: CircleAnnotationAdaptor = null

Private currentDoubleTapTouchAdaptor

currentDoubleTapTouchAdaptor: any = null

Private currentMouseAdaptor

currentMouseAdaptor: any

Private currentMouseMoveAdaptorOverride

currentMouseMoveAdaptorOverride: any

Private currentSingleFingerTouchAdaptor

currentSingleFingerTouchAdaptor: any = null

Private currentSingleTapTouchAdaptor

currentSingleTapTouchAdaptor: any = null

Private currentThreeFingerTouchAdaptor

currentThreeFingerTouchAdaptor: any = null

Private currentTwoFingerTouchAdaptor

currentTwoFingerTouchAdaptor: any = null

Private ellipseAdaptor

ellipseAdaptor: EllipseAnnotationAdaptor = null

Private emptyAdaptor

emptyAdaptor: EmptyAdaptor = null

Private flip2DAdaptor

flip2DAdaptor: NativeAdaptor2D

Private globalMouseHandlerActive

globalMouseHandlerActive: boolean = true

Private globalMouseMoveListener

globalMouseMoveListener: any

Private globalMouseUpListener

globalMouseUpListener: any

Private htmlViewport

htmlViewport: HTMLViewport

Private isAnnotationEdit

isAnnotationEdit: boolean = false

Private keyPressListener

keyPressListener: any

Private keyUpListener

keyUpListener: any

Private lastTapEvent

lastTapEvent: number = 0

Private lineAdaptor

lineAdaptor: LineAnnotationAdaptor = null

Private manualNavigateAdaptor

manualNavigateAdaptor: ManualNavigateAdaptor = null

Private mouseDown

mouseDown: boolean = false

Private mouseDownListener

mouseDownListener: any

Private mouseEnterListener

mouseEnterListener: any

Private mouseLeaveListener

mouseLeaveListener: any

Private mouseMapping

mouseMapping: object

Type declaration

Private mouseMoveListener

mouseMoveListener: any

Private mouseUpListener

mouseUpListener: any

Private mouseWheelListener

mouseWheelListener: any

Private nativePanAdaptor

nativePanAdaptor: NativeAdaptor = null

Private nativeRotateAdaptor

nativeRotateAdaptor: NativeAdaptor = null

Private nativeZoomAdaptor

nativeZoomAdaptor: NativeAdaptor = null

Private overrideMouseAdaptor

overrideMouseAdaptor: MouseAdaptorInterface = null

Private overrideTouchAdaptor

overrideTouchAdaptor: TouchAdaptorInterface = null

Private page2DAdaptor

page2DAdaptor: NativeAdaptor2D

Private page2DTouchAdaptor

page2DTouchAdaptor: NativeAdaptorTouch2D

Private pan2DAdaptor

pan2DAdaptor: NativeAdaptor2D

Private panZoom2DTouchAdaptor

panZoom2DTouchAdaptor: PanZoomNativeAdaptorTouch2D

Private pointAdaptor

pointAdaptor: PointAnnotationAdaptor = null

Private processingAnnotationAdaptor

processingAnnotationAdaptor: boolean = false

Private processingKeyboardAdaptor

processingKeyboardAdaptor: boolean = false

Private processingMouseAdaptor

processingMouseAdaptor: boolean = false

Private rotate2DAdaptor

rotate2DAdaptor: NativeAdaptor2D

Private rotateMouseAdaptor

rotateMouseAdaptor: RotateMouseAdaptor = null

Private rotateTouchAdaptor

rotateTouchAdaptor: RotateTouchAdaptor = null

Private scroll2DAdaptor

scroll2DAdaptor: NativeAdaptor2D

Private scrollAdaptor

scrollAdaptor: ScrollMouseAdaptor = null

Private scrollAdaptorAxial

scrollAdaptorAxial: ScrollMouseAdaptorAxial = null

Private scrollAdaptorCoronal

scrollAdaptorCoronal: ScrollMouseAdaptorCoronal = null

Private scrollAdaptorSagittal

scrollAdaptorSagittal: ScrollMouseAdaptorSagittal = null

Private scrollTouchAdaptor

scrollTouchAdaptor: ScrollTouchAdaptor = null

Private scrollTouchAdaptorAxial

scrollTouchAdaptorAxial: ScrollTouchAdaptorAxial = null

Private scrollTouchAdaptorCoronal

scrollTouchAdaptorCoronal: ScrollTouchAdaptorCoronal = null

Private scrollTouchAdaptorSagittal

scrollTouchAdaptorSagittal: ScrollTouchAdaptorSagittal = null

Private surfaceRotateMouseAdaptor

surfaceRotateMouseAdaptor: SurfaceRotateMouseAdaptor = null

Private textAdaptor

textAdaptor: TextAnnotationAdaptor = null

Private touchEndListener

touchEndListener: any

Private touchMapping

touchMapping: object

Type declaration

Private touchMoveListener

touchMoveListener: any

Private touchStartListener

touchStartListener: any

Private touchStarted

touchStarted: boolean[] = new Array(3)

Private touchTimeout

touchTimeout: any

Private voxelValueAdaptor

voxelValueAdaptor: VoxelValueAdaptor = null

Private windowLevel2DAdaptor

windowLevel2DAdaptor: NativeAdaptor2D

Private windowLevel2DTouchAdaptor

windowLevel2DTouchAdaptor: NativeAdaptorTouch2D

Private windowLevelAdaptor

windowLevelAdaptor: WindowLevelAdaptor = null

Private windowLevelTouchAdaptor

windowLevelTouchAdaptor: WindowLevelTouchAdaptor = null

Private zoom2DAdaptor

zoom2DAdaptor: NativeAdaptor2D

Private 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

Private createAnnotationKey

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

    Parameters

    Returns string

Private createMouseKey

  • creates a unique hash key for the specified 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

Private getAnnotationAdaptor

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

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): 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 void

mouseMoveHandler

  • mouseMoveHandler(event: MouseEvent): 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 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): 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 void

postRender

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

    • htmlViewport: any
    • renderParams: any

    Returns void

Private processMouseMove

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

    Parameters

    • event: MouseEvent

    Returns void

Private processMouseReleased

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

    Parameters

    • event: MouseEvent

    Returns void

removeHTMLEventListener

  • removeHTMLEventListener(): void
  • Returns void

reset

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

    • Default value isSaveText: boolean = false

    Returns void

Private resetAnnotationEdit

  • resetAnnotationEdit(): void
  • Returns void

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

setMouseAdaptor

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

    Parameters

    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

Private unbindEventHandlers

  • unbindEventHandlers(): void
  • Returns void

Private use2DAdaptors

  • use2DAdaptors(): boolean
  • Returns boolean

Object literals

Private lastClientXY

lastClientXY: object

clientX

clientX: number = 0

clientY

clientY: number = 0