UNPKG

@inweb/viewer-core

Version:

3D CAD and BIM data Viewer core

137 lines (117 loc) 3.11 kB
/////////////////////////////////////////////////////////////////////////////// // Copyright (C) 2002-2025, Open Design Alliance (the "Alliance"). // All rights reserved. // // This software and its documentation and related materials are owned by // the Alliance. The software may only be incorporated into application // programs owned by members of the Alliance, subject to a signed // Membership Agreement and Supplemental Software License Agreement with the // Alliance. The structure and organization of this software are the valuable // trade secrets of the Alliance and its suppliers. The software is also // protected by copyright law and international treaty provisions. Application // programs incorporating this software must include the following statement // with their copyright notices: // // This application incorporates Open Design Alliance software pursuant to a // license agreement with Open Design Alliance. // Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance. // All rights reserved. // // By use of this software, its documentation or related materials, you // acknowledge and accept the above terms. /////////////////////////////////////////////////////////////////////////////// export const CanvasEvents = [ "click", "contextmenu", "dblclick", "mousedown", "mouseleave", "mousemove", "mouseup", "pointercancel", "pointerdown", "pointerleave", "pointermove", "pointerup", "touchcancel", "touchend", "touchmove", "touchstart", "wheel", ]; export const CANVAS_EVENTS = CanvasEvents; /** * Canvas Events. * * @event */ export interface CanvasEventMap { /** * Event that fires on mouse click. */ click: MouseEvent; /** * Event that fires when the user attempts to open a context menu. */ contextmenu: PointerEvent; /** * Event that fires on mouse double click. */ dblclick: MouseEvent; /** * Event that fires on mouse button is down. */ mousedown: MouseEvent; /** * Event that fires on mouse leave. */ mouseleave: MouseEvent; /** * Event that fires on mouse move. */ mousemove: MouseEvent; /** * Event that fires on mouse button is up. */ mouseup: MouseEvent; /** * Event is fired when the browser determines that there are unlikely to be any more pointer events. */ pointercancel: PointerEvent; /** * Event that fires on mouse button is down. */ pointerdown: PointerEvent; /** * Event that fires on mouse leave. */ pointerleave: PointerEvent; /** * Event that fires on mouse move. */ pointermove: PointerEvent; /** * Event that fires on mouse button is up. */ pointerup: PointerEvent; /** * Event that fires touch is canceled. */ touchcancel: TouchEvent; /** * Event that fires touch is ended. */ touchend: TouchEvent; /** * Event that fires touch is moving. */ touchmove: TouchEvent; /** * Event that fires when touch is started. */ touchstart: TouchEvent; /** * Event that fires when mouse wheel is moving. */ wheel: MouseEvent; }