UNPKG

2.07 kBHTMLView Raw
1<!DOCTYPE html>
2<html>
3<head>
4 <title>LightBox Style HTML Custom Context Menu</title>
5 <!-- Copyright 1998-2021 by Northwoods Software Corporation. -->
6 <meta name="description" content="Demonstrate context menus implemented in HTML covering the whole window." />
7 <meta name="viewport" content="width=device-width, initial-scale=1">
8
9 <link rel='stylesheet' href='../extensions/LightBoxContextMenu.css' />
10 <script src="../samples/assets/require.js"></script>
11 <script src="../assets/js/goSamples.js"></script>
12
13 <!-- requires minimal.js, built from minimal.ts -->
14 <script>
15 function init() {
16 require(["htmlLightBoxContextMenuScript", "../extensionsTS/LightBoxContextMenu"], function(app) {
17 app.init();
18 });
19 }
20 </script>
21</head>
22<body onload="init()">
23 <div id="sample">
24 <div style="display: inline-block;">
25 <div style="position: relative">
26 <div id="myDiagramDiv" style="border: solid 1px black; width:400px; height:400px"></div>
27 </div>
28 <div id="description">
29 <p>
30 This demonstrates the implementation of a custom HTML context menu using <a>HTMLInfo</a>.
31 This sample is also a re-implementation of the built-in <a>ContextMenuTool.defaultTouchContextMenu</a>.
32 </p>
33
34 <p>The implementation is contained in the files <a href="../extensionsTS/LightBoxContextMenu.ts">LightBoxContextMenu.ts</a> and <a href="../extensionsTS/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>.
35
36 <p>For a more regular HTML context menu implementation, see the <a href="customContextMenu.html">Custom Context Menu</a> sample.</p>
37 <p>Right-click or tap-hold (mobile) on a Node to bring up a context menu.
38 If you have a selection copied in the clipboard,
39 you can bring up a context menu anywhere to paste.</p>
40 </div>
41 </div>
42 </div>
43</body>
44</html>
\No newline at end of file