ContextMenuTool$Typings extension
Properties
- currentContextMenu ↔ dynamic
-
Available on ContextMenuTool, provided by the ContextMenuTool$Typings extension
Gets or sets the currently showing context menu, or null if there is none. This is typically only set in #showContextMenu and not by the user. It is also typically set to null in #hideContextMenu.getter/setter pair - currentObject ↔ GraphObject?
-
Available on ContextMenuTool, provided by the ContextMenuTool$Typings extension
Gets or sets the GraphObject found at the mouse point that has a context menu. This property remembers the result returned by #findObjectWithContextMenu if it is a GraphObject. This value is passed to #showContextMenu as the second argument. The value will be null if the context menu is for the diagram rather than for a particular GraphObject.getter/setter pair - defaultTouchContextMenu ↔ dynamic
-
Available on ContextMenuTool, provided by the ContextMenuTool$Typings extension
Gets or sets the HTMLInfo or Adornment that acts as the default touch context menu. On touch devices, this context menu will appear even there is no context menu defined.getter/setter pair - mouseDownPoint ↔ Point
-
Available on ContextMenuTool, provided by the ContextMenuTool$Typings extension
This read-only property returns the original mouse-down point in document coordinates.getter/setter pair
Methods
-
canStart(
) → bool -
Available on ContextMenuTool, provided by the ContextMenuTool$Typings extension
Return true if it's a single mouse right click that hasn't moved Tool#isBeyondDragSize and that is on a GraphObject with a GraphObject#contextMenu. This is also true if the mouse right click is in the diagram background and the diagram's Diagram#contextMenu is non-null. -
doActivate(
) → void -
Available on ContextMenuTool, provided by the ContextMenuTool$Typings extension
Do nothing, activation is special and relies on doMouseUp -
doMouseDown(
) → void -
Available on ContextMenuTool, provided by the ContextMenuTool$Typings extension
Activate this but also execute the normal behavior that would happen on a mouse-up if this tool is in the ToolManager#mouseDownTools list. Perform ActionTool#doMouseDown if a ContextMenuButton was hit. -
doMouseMove(
) → void -
Available on ContextMenuTool, provided by the ContextMenuTool$Typings extension
Handle mouse-enter, mouse-over, and mouse-leave events, as well as tooltips. -
doMouseUp(
) → void -
Available on ContextMenuTool, provided by the ContextMenuTool$Typings extension
If there is something found by #findObjectWithContextMenu, call #showContextMenu with that object's GraphObject#contextMenu or the Diagram#contextMenu. -
findObjectWithContextMenu(
[Object? obj]) → dynamic -
Available on ContextMenuTool, provided by the ContextMenuTool$Typings extension
Find a GraphObject at the current mouse point with a GraphObject#contextMenu, or return the Diagram if there is a Diagram#contextMenu. -
hideContextMenu(
) → void -
Available on ContextMenuTool, provided by the ContextMenuTool$Typings extension
Hide any context menu. -
hideDefaultContextMenu(
) → void -
Available on ContextMenuTool, provided by the ContextMenuTool$Typings extension
This is the HTMLInfo#hide method for the #defaultTouchContextMenu. -
positionContextMenu(
GraphObject? obj]) → void -
Available on ContextMenuTool, provided by the ContextMenuTool$Typings extension
This is called by #showContextMenu to position the context menu within the viewport. It normally goes just below the cursor. But if the mouse is too close to the right edge or the bottom edge of the viewport, it is positioned left and/or above the cursor. -
showContextMenu(
GraphObject? obj]) → void -
Available on ContextMenuTool, provided by the ContextMenuTool$Typings extension
Show an Adornment or HTMLInfo as a context menu. -
showDefaultContextMenu(
) → void -
Available on ContextMenuTool, provided by the ContextMenuTool$Typings extension
This is the HTMLInfo#show method for the #defaultTouchContextMenu.