You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
2.0 KiB
45 lines
2.0 KiB
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>LightBox Style HTML Custom Context Menu</title>
|
|
<meta name="description" content="Demonstrate context menus implemented in HTML covering the whole window." />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<!-- Copyright 1998-2019 by Northwoods Software Corporation. -->
|
|
|
|
<link rel='stylesheet' href='../extensions/LightBoxContextMenu.css' />
|
|
<script src="../samples/assets/require.js"></script>
|
|
<script src="../assets/js/goSamples.js"></script>
|
|
|
|
<!-- requires minimal.js, built from minimal.ts -->
|
|
<script>
|
|
function init() {
|
|
require(["htmlLightBoxContextMenuScript", "../extensionsTS/LightBoxContextMenu"], function(app) {
|
|
app.init();
|
|
});
|
|
}
|
|
</script>
|
|
</head>
|
|
<body onload="init()">
|
|
<div id="sample">
|
|
<div style="display: inline-block;">
|
|
<div style="position: relative">
|
|
<div id="myDiagramDiv" style="border: solid 1px black; width:400px; height:400px"></div>
|
|
</div>
|
|
<div id="description">
|
|
<p>
|
|
This demonstrates the implementation of a custom HTML context menu using <a>HTMLInfo</a>.
|
|
This sample is also a re-implementation of the built-in <a>ContextMenuTool.defaultTouchContextMenu</a>.
|
|
</p>
|
|
|
|
<p>The implementation is contained in the files <a href="../extensions/LightBoxContextMenu.js">LightBoxContextMenu.js</a> and <a href="../extensions/LightBoxContextMenu.css">LightBoxContextMenu.css</a>. The JavaScript file exposes <code>window.myHTMLLightBox</code>, which is used in this file as the value of <code>myDiagram.contextMenu</code>.
|
|
|
|
<p>For a more regular HTML context menu implementation, see the <a href="customContextMenu.html">Custom Context Menu</a> sample.</p>
|
|
<p>Right-click or tap-hold (mobile) on a Node to bring up a context menu.
|
|
If you have a selection copied in the clipboard,
|
|
you can bring up a context menu anywhere to paste.</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html> |