gojs
Version:
Interactive diagrams, charts, and graphs, such as trees, flowcharts, orgcharts, UML, BPMN, or business diagrams
153 lines • 50.6 kB
HTML
<!DOCTYPE html><html class="default"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>ContextMenuTool | GoJS API</title><meta name="description" content="Documentation for GoJS API"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../../assets/css/style.css"/><link rel="stylesheet" href="../assets/style-tsd.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.body.classList.add(localStorage.getItem("tsd-theme") || "os")</script><header><nav id="navTop" class="w-full z-30 top-0 text-white bg-nwoods-primary"><div class="w-full container max-w-screen-lg mx-auto flex flex-wrap sm:flex-nowrap items-center justify-between mt-0 py-2"><div class="md:pl-4"><a class="text-white hover:text-white no-underline hover:no-underline\n font-bold text-2xl lg:text-4xl rounded-lg hover:bg-nwoods-secondary" href="../../index.html"><h1 class="my-0 p-1 leading-none">GoJS</h1></a></div><button id="topnavButton" class="rounded-lg sm:hidden focus:outline-none focus:ring" aria-label="Navigation"><svg fill="currentColor" viewBox="0 0 20 20" class="w-6 h-6"><path id="topnavOpen" fill-rule="evenodd" d="M3 5a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 10a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM9 15a1 1 0 011-1h6a1 1 0 110 2h-6a1 1 0 01-1-1z" clip-rule="evenodd"></path><path id="topnavClosed" class="hidden" fill-rule="evenodd" d="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z" clip-rule="evenodd"></path></svg></button><div id="topnavList" class="hidden sm:block items-center w-auto mt-0 text-white p-0 z-20"><ul class="list-reset list-none font-semibold flex justify-end flex-wrap sm:flex-nowrap items-center px-0 pb-0"><li class="p-1 sm:p-0"><a class="topnav-link" href="../../learn/index.html">Learn</a></li><li class="p-1 sm:p-0"><a class="topnav-link" href="../../samples/index.html">Samples</a></li><li class="p-1 sm:p-0"><a class="topnav-link" href="../../intro/index.html">Intro</a></li><li class="p-1 sm:p-0"><a class="topnav-link" href="../../api/index.html">API</a></li><li class="p-1 sm:p-0"><a class="topnav-link" href="https://www.nwoods.com/products/register.html">Register</a></li><li class="p-1 sm:p-0"><a class="topnav-link" href="../../download.html">Download</a></li><li class="p-1 sm:p-0"><a class="topnav-link" href="https://forum.nwoods.com/c/gojs/11">Forum</a></li><li class="p-1 sm:p-0"><a class="topnav-link" href="https://www.nwoods.com/contact.html" target="_blank" rel="noopener" id="contactBtn">Contact</a></li><li class="p-1 sm:p-0"><a class="topnav-link" href="https://www.nwoods.com/sales/index.html" target="_blank" rel="noopener" id="buyBtn">Buy</a></li></ul></div></div><hr class="border-b border-gray-600 opacity-50 my-0 py-0"/></nav><div class="tsd-page-header"><div class="tsd-page-toolbar"><div class="w-full max-w-screen-xl mx-auto px-2"><div class="table-wrap"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget search no-caption">Search</label><input type="text" id="tsd-search-field"/></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">GoJS API</a></div><div class="table-cell" id="tsd-widgets"><div id="tsd-filter"><a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a><div class="tsd-filter-group"><div class="tsd-select" id="tsd-filter-visibility"><span class="tsd-select-label">All</span><ul class="tsd-select-list"><li data-value="public">Public</li><li data-value="protected">Public/Protected</li><li data-value="private" class="selected">All</li></ul></div> <input type="checkbox" id="tsd-filter-inherited"/><label class="tsd-widget" for="tsd-filter-inherited">Inherited</label></div></div><a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a></div></div></div></div></div><div class="tsd-page-title"><div class="w-full max-w-screen-xl mx-auto px-2"><div class="top-copyright"><b>GoJS</b>® Diagramming Components<br/>version 2.3.8<br/>by <a href="https://www.nwoods.com/">Northwoods Software®</a></div><div><h1>Class ContextMenuTool </h1></div></div></div></header><div class="tsd w-full max-w-screen-xl mx-auto pb-4"><div class="row px-2 w-full"><div class="col-8 col-content"><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><a href="Tool.html" class="tsd-signature-type" data-tsd-kind="Class">Tool</a><ul class="tsd-hierarchy"><li><span class="target">ContextMenuTool</span></li></ul></li></ul></section><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography">
<p>The ContextMenuTool is used to create and show a context menu.
It automatically disables any browser context menu.</p>
<div><p>Define context menus on individual <a href="GraphObject.html">GraphObject</a>s by setting <a href="GraphObject.html#contextMenu">GraphObject.contextMenu</a>.
Define a context menu for the diagram background by setting <a href="Diagram.html#contextMenu">Diagram.contextMenu</a>.</p>
<p>This tool is a standard mouse-down tool, the <a href="ToolManager.html#contextMenuTool">ToolManager.contextMenuTool</a>.</p>
<p>This tool does not utilize any tool handles.
This tool does not modify the model or conduct any transaction,
although any code invoked by context menu commands might do so.</p>
<p>There are examples of customizing this tool in the
<a href="../../samples/customContextMenu.html">Custom Context Menu</a> and
<a href="../../samples/htmlLightBoxContextMenu.html">HTML LightBox Context Menu</a> samples.</p>
<p>If you want to programmatically show a context menu for a particular GraphObject or for the
whole diagram, call <a href="CommandHandler.html#showContextMenu">CommandHandler.showContextMenu</a>.
That command method is also invoked by the Menu key on the keyboard.</p>
<p>Normally this shows a context menu (if available) on a right-mouse-up event.
If you want it to happen on a right-mouse-down event, you'll need to move this tool
from the <a href="ToolManager.html#mouseUpTools">ToolManager.mouseUpTools</a> list to the <a href="ToolManager.html#mouseDownTools">ToolManager.mouseDownTools</a> list:</p>
<pre><code class="language-js"><span class="hl-4">myDiagram</span><span class="hl-2">.</span><span class="hl-4">toolManager</span><span class="hl-2">.</span><span class="hl-4">mouseDownTools</span><span class="hl-2">.</span><span class="hl-5">add</span><span class="hl-2">(</span><span class="hl-4">myDiagram</span><span class="hl-2">.</span><span class="hl-4">toolManager</span><span class="hl-2">.</span><span class="hl-5">replaceTool</span><span class="hl-2">(</span><span class="hl-6">"ContextMenu"</span><span class="hl-2">, </span><span class="hl-1">null</span><span class="hl-2">));</span>
</code></pre>
</div></div></section><section class="tsd-panel-group tsd-index-group"><h2>Index</h2><section class="tsd-panel tsd-index-panel"><div class="tsd-index-content"><section class="tsd-index-section "><h3>Constructors</h3><ul class="tsd-index-list"><li class="tsd-kind-constructor tsd-parent-kind-class tsd-is-overwrite"><a href="ContextMenuTool.html#constructor" class="tsd-kind-icon">constructor</a></li></ul></section><section class="tsd-index-section "><h3>Properties</h3><ul class="tsd-index-list"><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="ContextMenuTool.html#currentContextMenu" class="tsd-kind-icon">current<wbr/>Context<wbr/>Menu</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="ContextMenuTool.html#currentObject" class="tsd-kind-icon">current<wbr/>Object</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="ContextMenuTool.html#defaultTouchContextMenu" class="tsd-kind-icon">default<wbr/>Touch<wbr/>Context<wbr/>Menu</a></li><li class="tsd-kind-get-signature tsd-parent-kind-class"><a href="ContextMenuTool.html#mouseDownPoint" class="tsd-kind-icon">mouse<wbr/>Down<wbr/>Point</a></li></ul></section><section class="tsd-index-section "><h3>Methods</h3><ul class="tsd-index-list"><li class="tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><a href="ContextMenuTool.html#canStart" class="tsd-kind-icon">can<wbr/>Start</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><a href="ContextMenuTool.html#doActivate" class="tsd-kind-icon">do<wbr/>Activate</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><a href="ContextMenuTool.html#doMouseDown" class="tsd-kind-icon">do<wbr/>Mouse<wbr/>Down</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><a href="ContextMenuTool.html#doMouseMove" class="tsd-kind-icon">do<wbr/>Mouse<wbr/>Move</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><a href="ContextMenuTool.html#doMouseUp" class="tsd-kind-icon">do<wbr/>Mouse<wbr/>Up</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="ContextMenuTool.html#findObjectWithContextMenu" class="tsd-kind-icon">find<wbr/>Object<wbr/>With<wbr/>Context<wbr/>Menu</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="ContextMenuTool.html#hideContextMenu" class="tsd-kind-icon">hide<wbr/>Context<wbr/>Menu</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="ContextMenuTool.html#hideDefaultContextMenu" class="tsd-kind-icon">hide<wbr/>Default<wbr/>Context<wbr/>Menu</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="ContextMenuTool.html#positionContextMenu" class="tsd-kind-icon">position<wbr/>Context<wbr/>Menu</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="ContextMenuTool.html#showContextMenu" class="tsd-kind-icon">show<wbr/>Context<wbr/>Menu</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="ContextMenuTool.html#showDefaultContextMenu" class="tsd-kind-icon">show<wbr/>Default<wbr/>Context<wbr/>Menu</a></li></ul></section></div></section></section><section class="tsd-panel-group tsd-index-group tsd-is-inherited"><h2>Inherited Members</h2><section class="tsd-panel tsd-index-panel"><div class="tsd-index-content"><section class="tsd-index-section undefined"><h3>Properties</h3><ul class="tsd-index-list"><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="Tool.html#diagram" class="tsd-kind-icon">Tool.diagram</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="Tool.html#isActive" class="tsd-kind-icon">Tool.is<wbr/>Active</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="Tool.html#isEnabled" class="tsd-kind-icon">Tool.is<wbr/>Enabled</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="Tool.html#name" class="tsd-kind-icon">Tool.name</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="Tool.html#transactionResult" class="tsd-kind-icon">Tool.transaction<wbr/>Result</a></li></ul></section><section class="tsd-index-section undefined"><h3>Methods</h3><ul class="tsd-index-list"><li class="tsd-kind-method tsd-parent-kind-class"><a href="Tool.html#canStartMultiTouch" class="tsd-kind-icon">Tool.can<wbr/>Start<wbr/>Multi<wbr/>Touch</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="Tool.html#cancelWaitAfter" class="tsd-kind-icon">Tool.cancel<wbr/>Wait<wbr/>After</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="Tool.html#doCancel" class="tsd-kind-icon">Tool.do<wbr/>Cancel</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="Tool.html#doDeactivate" class="tsd-kind-icon">Tool.do<wbr/>Deactivate</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="Tool.html#doKeyDown" class="tsd-kind-icon">Tool.do<wbr/>Key<wbr/>Down</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="Tool.html#doKeyUp" class="tsd-kind-icon">Tool.do<wbr/>Key<wbr/>Up</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="Tool.html#doMouseWheel" class="tsd-kind-icon">Tool.do<wbr/>Mouse<wbr/>Wheel</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="Tool.html#doWaitAfter" class="tsd-kind-icon">Tool.do<wbr/>Wait<wbr/>After</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="Tool.html#findToolHandleAt" class="tsd-kind-icon">Tool.find<wbr/>Tool<wbr/>Handle<wbr/>At</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="Tool.html#isBeyondDragSize" class="tsd-kind-icon">Tool.is<wbr/>Beyond<wbr/>Drag<wbr/>Size</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter"><a href="Tool.html#standardMouseClick" class="tsd-kind-icon">Tool.standard<wbr/>Mouse<wbr/>Click</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="Tool.html#standardMouseOver" class="tsd-kind-icon">Tool.standard<wbr/>Mouse<wbr/>Over</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="Tool.html#standardMouseSelect" class="tsd-kind-icon">Tool.standard<wbr/>Mouse<wbr/>Select</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="Tool.html#standardMouseWheel" class="tsd-kind-icon">Tool.standard<wbr/>Mouse<wbr/>Wheel</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="Tool.html#standardPinchZoomMove" class="tsd-kind-icon">Tool.standard<wbr/>Pinch<wbr/>Zoom<wbr/>Move</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="Tool.html#standardPinchZoomStart" class="tsd-kind-icon">Tool.standard<wbr/>Pinch<wbr/>Zoom<wbr/>Start</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="Tool.html#standardWaitAfter" class="tsd-kind-icon">Tool.standard<wbr/>Wait<wbr/>After</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="Tool.html#startTransaction" class="tsd-kind-icon">Tool.start<wbr/>Transaction</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="Tool.html#stopTool" class="tsd-kind-icon">Tool.stop<wbr/>Tool</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="Tool.html#stopTransaction" class="tsd-kind-icon">Tool.stop<wbr/>Transaction</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="Tool.html#updateAdornments" class="tsd-kind-icon">Tool.update<wbr/>Adornments</a></li></ul></section></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Constructors</h2><section class="tsd-panel tsd-member tsd-kind-constructor tsd-parent-kind-class tsd-is-overwrite"><a id="constructor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> constructor<a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-constructor tsd-parent-kind-class tsd-is-overwrite"><li class="tsd-signature tsd-kind-icon">new <wbr/>Context<wbr/>Menu<wbr/>Tool<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="ContextMenuTool.html" class="tsd-signature-type" data-tsd-kind="Class">ContextMenuTool</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>You do not normally need to create an instance of this tool
because one already exists as the <a href="ToolManager.html#contextMenuTool">ToolManager.contextMenuTool</a>, which you can modify.</p>
<div><p>The <a href="Tool.html#name">Tool.name</a> of this tool is "ContextMenu".</p>
</div></div><h4 class="tsd-returns-title">Returns <a href="ContextMenuTool.html" class="tsd-signature-type" data-tsd-kind="Class">ContextMenuTool</a></h4></li></ul></section></section><section class="tsd-panel-group tsd-member-group "><h2>Properties</h2><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="currentContextMenu" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> current<wbr/>Context<wbr/>Menu<span class="tsd-signature-symbol">: </span><a href="Adornment.html" class="tsd-signature-type" data-tsd-kind="Class">Adornment</a><span class="tsd-signature-symbol"> | </span><a href="HTMLInfo.html" class="tsd-signature-type" data-tsd-kind="Class">HTMLInfo</a><a href="#currentContextMenu" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Gets or sets the currently showing context menu, or null if there is none.
This is typically only set in <a href="ContextMenuTool.html#showContextMenu">showContextMenu</a> and not by the user.
It is also typically set to null in <a href="ContextMenuTool.html#hideContextMenu">hideContextMenu</a>.</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="currentObject" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> current<wbr/>Object<span class="tsd-signature-symbol">: </span><a href="GraphObject.html" class="tsd-signature-type" data-tsd-kind="Class">GraphObject</a><a href="#currentObject" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Gets or sets the <a href="GraphObject.html">GraphObject</a> found at the mouse point that has a context menu.
This property remembers the result returned by <a href="ContextMenuTool.html#findObjectWithContextMenu">findObjectWithContextMenu</a> if it is a GraphObject.
This value is passed to <a href="ContextMenuTool.html#showContextMenu">showContextMenu</a> as the second argument.
The value will be null if the context menu is for the diagram rather than for a particular GraphObject.</p>
<dl class="tsd-comment-tags"><dt class="">since</dt><dd><p>1.4</p>
</dd></dl></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-accessor tsd-parent-kind-class"><a id="defaultTouchContextMenu" class="tsd-anchor"></a><h3 class="tsd-anchor-link"> default<wbr/>Touch<wbr/>Context<wbr/>Menu<span class="tsd-signature-symbol">: </span><a href="Adornment.html" class="tsd-signature-type" data-tsd-kind="Class">Adornment</a><span class="tsd-signature-symbol"> | </span><a href="HTMLInfo.html" class="tsd-signature-type" data-tsd-kind="Class">HTMLInfo</a><a href="#defaultTouchContextMenu" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>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.</p>
<div><p>You can disable this functionality by setting this property to null.</p>
<p>By default shows a set of HTML elements acting as a context menu.</p>
</div><dl class="tsd-comment-tags"><dt class="">since</dt><dd><p>1.7</p>
</dd></dl></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-get-signature tsd-parent-kind-class"><a id="mouseDownPoint" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagReadOnly">Read-only</span> mouse<wbr/>Down<wbr/>Point<span class="tsd-signature-symbol">: </span><a href="Point.html" class="tsd-signature-type" data-tsd-kind="Class">Point</a><a href="#mouseDownPoint" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>This read-only property returns the original mouse-down point in document coordinates.</p>
</div></li></ul></section></section><section class="tsd-panel-group tsd-member-group "><h2>Methods</h2><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><a id="canStart" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagOverride">Override</span> <span class="tsd-flag ts-flagVirtual">Virtual</span> can<wbr/>Start<a href="#canStart" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><li class="tsd-signature tsd-kind-icon">can<wbr/>Start<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Return true if it's a single mouse right click that hasn't moved <a href="Tool.html#isBeyondDragSize">Tool.isBeyondDragSize</a>
and that is on a <a href="GraphObject.html">GraphObject</a> with a <a href="GraphObject.html#contextMenu">GraphObject.contextMenu</a>.
This is also true if the mouse right click is in the diagram background
and the diagram's <a href="Diagram.html#contextMenu">Diagram.contextMenu</a> is non-null.</p>
<div><p>On touch devices, a special default context menu will appear even if no object with a context menu is found.</p>
<p>This method may be overridden.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</p>
</div></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><div></div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><a id="doActivate" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagOverride">Override</span> do<wbr/>Activate<a href="#doActivate" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><li class="tsd-signature tsd-kind-icon">do<wbr/>Activate<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Do nothing, activation is special and relies on doMouseUp</p>
</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><a id="doMouseDown" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagOverride">Override</span> do<wbr/>Mouse<wbr/>Down<a href="#doMouseDown" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><li class="tsd-signature tsd-kind-icon">do<wbr/>Mouse<wbr/>Down<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Activate this but also execute the normal behavior that would happen on a mouse-up
if this tool is in the <a href="ToolManager.html#mouseDownTools">ToolManager.mouseDownTools</a> list.
Perform <a href="ActionTool.html#doMouseDown">ActionTool.doMouseDown</a> if a ContextMenuButton was hit.</p>
</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><a id="doMouseMove" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagOverride">Override</span> do<wbr/>Mouse<wbr/>Move<a href="#doMouseMove" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><li class="tsd-signature tsd-kind-icon">do<wbr/>Mouse<wbr/>Move<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Handle mouse-enter, mouse-over, and mouse-leave events, as well as tooltips.</p>
</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><a id="doMouseUp" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagOverride">Override</span> do<wbr/>Mouse<wbr/>Up<a href="#doMouseUp" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><li class="tsd-signature tsd-kind-icon">do<wbr/>Mouse<wbr/>Up<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>If there is something found by <a href="ContextMenuTool.html#findObjectWithContextMenu">findObjectWithContextMenu</a>,
call <a href="ContextMenuTool.html#showContextMenu">showContextMenu</a> with that object's <a href="GraphObject.html#contextMenu">GraphObject.contextMenu</a>
or the <a href="Diagram.html#contextMenu">Diagram.contextMenu</a>.</p>
<div><p>Once a context menu is being shown,
if a click occurs on a part of the context menu, call <a href="Tool.html#standardMouseClick">Tool.standardMouseClick</a>.
Otherwise if the click occurs elsewhere, just stop this tool.
Unlike most tools, the first mouse-up should not stop this tool.</p>
</div></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="findObjectWithContextMenu" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagVirtual">Virtual</span> find<wbr/>Object<wbr/>With<wbr/>Context<wbr/>Menu<a href="#findObjectWithContextMenu" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">find<wbr/>Object<wbr/>With<wbr/>Context<wbr/>Menu<span class="tsd-signature-symbol">(</span>obj<span class="tsd-signature-symbol">?: </span><a href="GraphObject.html" class="tsd-signature-type" data-tsd-kind="Class">GraphObject</a><span class="tsd-signature-symbol"> | </span><a href="Diagram.html" class="tsd-signature-type" data-tsd-kind="Class">Diagram</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="GraphObject.html" class="tsd-signature-type" data-tsd-kind="Class">GraphObject</a><span class="tsd-signature-symbol"> | </span><a href="Diagram.html" class="tsd-signature-type" data-tsd-kind="Class">Diagram</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Find a <a href="GraphObject.html">GraphObject</a> at the current mouse point with a <a href="GraphObject.html#contextMenu">GraphObject.contextMenu</a>,
or return the <a href="Diagram.html">Diagram</a> if there is a <a href="Diagram.html#contextMenu">Diagram.contextMenu</a>.</p>
<div><p>This method may be overridden.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> obj: <a href="GraphObject.html" class="tsd-signature-type" data-tsd-kind="Class">GraphObject</a><span class="tsd-signature-symbol"> | </span><a href="Diagram.html" class="tsd-signature-type" data-tsd-kind="Class">Diagram</a></h5><div class="tsd-comment tsd-typography">
<p>Optional GraphObject with which to start searching for a context menu.
If null, the Diagram will be used. If no argument is specified, this method will look for an object at the current mouse point.</p>
</div></li></ul><h4 class="tsd-returns-title">Returns <a href="GraphObject.html" class="tsd-signature-type" data-tsd-kind="Class">GraphObject</a><span class="tsd-signature-symbol"> | </span><a href="Diagram.html" class="tsd-signature-type" data-tsd-kind="Class">Diagram</a></h4><div><p>something with a <code>contextMenu</code>,
or null if nothing can be found with a context menu at the current mouse point.</p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="hideContextMenu" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagVirtual">Virtual</span> hide<wbr/>Context<wbr/>Menu<a href="#hideContextMenu" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">hide<wbr/>Context<wbr/>Menu<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Hide any context menu.</p>
<div><p>This method may be overridden.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</p>
</div></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="hideDefaultContextMenu" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagVirtual">Virtual</span> hide<wbr/>Default<wbr/>Context<wbr/>Menu<a href="#hideDefaultContextMenu" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">hide<wbr/>Default<wbr/>Context<wbr/>Menu<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>This is the <a href="HTMLInfo.html#hide">HTMLInfo.hide</a> method for the <a href="ContextMenuTool.html#defaultTouchContextMenu">defaultTouchContextMenu</a>.</p>
<div><p>This method may be overridden.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a>
for how to override methods and how to call this base method.</p>
</div></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="positionContextMenu" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagVirtual">Virtual</span> position<wbr/>Context<wbr/>Menu<a href="#positionContextMenu" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">position<wbr/>Context<wbr/>Menu<span class="tsd-signature-symbol">(</span>contextmenu<span class="tsd-signature-symbol">: </span><a href="Adornment.html" class="tsd-signature-type" data-tsd-kind="Class">Adornment</a>, obj<span class="tsd-signature-symbol">: </span><a href="GraphObject.html" class="tsd-signature-type" data-tsd-kind="Class">GraphObject</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>This is called by <a href="ContextMenuTool.html#showContextMenu">showContextMenu</a> 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.</p>
<div><p>This method only operates if the context menu, an <a href="Adornment.html">Adornment</a>, does not have a <a href="Adornment.html#placeholder">Adornment.placeholder</a>.
When there is a <a href="Placeholder.html">Placeholder</a> in the context menu, that Adornment is automatically positioned
so that the Placeholder is positioned at the adorned object, the second argument to this method.</p>
<p>This method may be overridden.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</p>
<p>If you override this method to position the context menu,
the context menu has already been measured but not arranged,
so you can use its <a href="GraphObject.html#measuredBounds">GraphObject.measuredBounds</a> width and height
but not its <a href="GraphObject.html#actualBounds">GraphObject.actualBounds</a>.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>contextmenu: <a href="Adornment.html" class="tsd-signature-type" data-tsd-kind="Class">Adornment</a></h5></li><li><h5>obj: <a href="GraphObject.html" class="tsd-signature-type" data-tsd-kind="Class">GraphObject</a></h5><div class="tsd-comment tsd-typography">
<p>The <a href="GraphObject.html">GraphObject</a> getting the context menu,
or null if the context menu is for the diagram background.</p>
</div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="showContextMenu" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagVirtual">Virtual</span> show<wbr/>Context<wbr/>Menu<a href="#showContextMenu" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">show<wbr/>Context<wbr/>Menu<span class="tsd-signature-symbol">(</span>contextmenu<span class="tsd-signature-symbol">: </span><a href="Adornment.html" class="tsd-signature-type" data-tsd-kind="Class">Adornment</a><span class="tsd-signature-symbol"> | </span><a href="HTMLInfo.html" class="tsd-signature-type" data-tsd-kind="Class">HTMLInfo</a>, obj<span class="tsd-signature-symbol">: </span><a href="GraphObject.html" class="tsd-signature-type" data-tsd-kind="Class">GraphObject</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>Show an <a href="Adornment.html">Adornment</a> or <a href="HTMLInfo.html">HTMLInfo</a> as a context menu.</p>
<div><p>This method is called by the context click (<a href="Tool.html#doMouseDown">Tool.doMouseDown</a>) and <a href="CommandHandler.html#showContextMenu">CommandHandler.showContextMenu</a>.
If you want to programmatically show a context menu for a particular GraphObject or for the
whole diagram, do not call this method, which only does one small piece of the process of
bringing up a context menu.
Instead call <a href="CommandHandler.html#showContextMenu">CommandHandler.showContextMenu</a>, which will start this tool
and eventually call this method and handle additional input events.</p>
<p>For <a href="Adornment.html">Adornment</a> context menus: If the object's containing <a href="Part.html">Part</a> is data-bound,
this sets the contextmenu's <code>Part.data</code> to the same value.
The <a href="Adornment.html#adornedObject">Adornment.adornedObject</a> property is set to the <a href="GraphObject.html">GraphObject</a> for which the menu is being shown.</p>
<p>This method sets the <a href="ContextMenuTool.html#currentContextMenu">currentContextMenu</a>.</p>
<p>This method may be overridden.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a> for how to override methods and how to call this base method.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>contextmenu: <a href="Adornment.html" class="tsd-signature-type" data-tsd-kind="Class">Adornment</a><span class="tsd-signature-symbol"> | </span><a href="HTMLInfo.html" class="tsd-signature-type" data-tsd-kind="Class">HTMLInfo</a></h5></li><li><h5>obj: <a href="GraphObject.html" class="tsd-signature-type" data-tsd-kind="Class">GraphObject</a></h5><div class="tsd-comment tsd-typography">
<p>the <a href="GraphObject.html">GraphObject</a> for which the context menu is being shown;
this is null if the contextmenu is being shown for the diagram background.</p>
</div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="showDefaultContextMenu" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagVirtual">Virtual</span> show<wbr/>Default<wbr/>Context<wbr/>Menu<a href="#showDefaultContextMenu" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">show<wbr/>Default<wbr/>Context<wbr/>Menu<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography">
<p>This is the <a href="HTMLInfo.html#show">HTMLInfo.show</a> method for the <a href="ContextMenuTool.html#defaultTouchContextMenu">defaultTouchContextMenu</a>.</p>
<div><p>If the object's containing <a href="Part.html">Part</a> is data-bound,
set the contextmenu's <code>Part.data</code> to the same value.
The <a href="Adornment.html#adornedObject">Adornment.adornedObject</a> property is set to the <a href="GraphObject.html">GraphObject</a>
for which the menu is being shown.</p>
<p>The menu carries some default CSS styling and uses the following CSS classes:</p>
<ul>
<li><code>goCXforeground</code> for the DIV containing the buttons</li>
<li><code>goCXbackground</code> for the darker DIV behind the context menu</li>
<li><code>goCXul</code> for the HTML <code>ul</code> items</li>
<li><code>goCXli</code> for the HTML <code>li</code> tag items</li>
<li><code>goCXa</code> for the HTML <code>a</code> tag items</li>
</ul>
<p>This method may be overridden.
Please read the Introduction page on <a href="../../intro/extensions.html">Extensions</a>
for how to override methods and how to call this base method.</p>
</div></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section></section></div><div class="col-4 col-menu menu-sticky-wrap menu-highlight"><nav class="tsd-navigation primary"><ul><li class=""><a href="../index.html">GoJS Class Index</a></li></ul></nav><nav class="tsd-navigation secondary menu-sticky"><ul><li class="current tsd-kind-class"><a href="ContextMenuTool.html" class="tsd-kind-icon">Context<wbr/>Menu<wbr/>Tool</a><ul><li class="tsd-kind-constructor tsd-parent-kind-class tsd-is-overwrite"><a href="ContextMenuTool.html#constructor" class="tsd-kind-icon">constructor</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="ContextMenuTool.html#currentContextMenu" class="tsd-kind-icon">current<wbr/>Context<wbr/>Menu</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="ContextMenuTool.html#currentObject" class="tsd-kind-icon">current<wbr/>Object</a></li><li class="tsd-kind-accessor tsd-parent-kind-class"><a href="ContextMenuTool.html#defaultTouchContextMenu" class="tsd-kind-icon">default<wbr/>Touch<wbr/>Context<wbr/>Menu</a></li><li class="tsd-kind-get-signature tsd-parent-kind-class"><a href="ContextMenuTool.html#mouseDownPoint" class="tsd-kind-icon">mouse<wbr/>Down<wbr/>Point</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><a href="ContextMenuTool.html#canStart" class="tsd-kind-icon">can<wbr/>Start</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><a href="ContextMenuTool.html#doActivate" class="tsd-kind-icon">do<wbr/>Activate</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><a href="ContextMenuTool.html#doMouseDown" class="tsd-kind-icon">do<wbr/>Mouse<wbr/>Down</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><a href="ContextMenuTool.html#doMouseMove" class="tsd-kind-icon">do<wbr/>Mouse<wbr/>Move</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><a href="ContextMenuTool.html#doMouseUp" class="tsd-kind-icon">do<wbr/>Mouse<wbr/>Up</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="ContextMenuTool.html#findObjectWithContextMenu" class="tsd-kind-icon">find<wbr/>Object<wbr/>With<wbr/>Context<wbr/>Menu</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="ContextMenuTool.html#hideContextMenu" class="tsd-kind-icon">hide<wbr/>Context<wbr/>Menu</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="ContextMenuTool.html#hideDefaultContextMenu" class="tsd-kind-icon">hide<wbr/>Default<wbr/>Context<wbr/>Menu</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="ContextMenuTool.html#positionContextMenu" class="tsd-kind-icon">position<wbr/>Context<wbr/>Menu</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="ContextMenuTool.html#showContextMenu" class="tsd-kind-icon">show<wbr/>Context<wbr/>Menu</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="ContextMenuTool.html#showDefaultContextMenu" class="tsd-kind-icon">show<wbr/>Default<wbr/>Context<wbr/>Menu</a></li></ul></li></ul></nav></div></div></div><div class="tsd w-full max-w-screen-xl mx-auto px-2"><div class="bottom-copyright">Copyright © 1998-2022 by Northwoods Software Corporation.</div></div><footer class=""><div class="tsd w-full max-w-screen-xl mx-auto px-2"><h2>Settings</h2><p class="mb-4">Theme <select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></p></div></footer><div class="overlay"></div><script src="../assets/main.js"></script><script async src="https://www.googletagmanager.com/gtag/js?id=UA-1506307-5"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date()); gtag('config', 'UA-1506307-5');
var getOutboundLink = function(url, label) {
gtag('event', 'click', {
'event_category': 'outbound',
'event_label': label,
'transport_type': 'beacon'
});
}
// topnav
var topButton = document.getElementById("topnavButton");
var topnavList = document.getElementById("topnavList");
topButton.addEventListener("click", function() {
this.classList.toggle