gojs
Version:
Interactive diagrams, charts, and graphs, such as trees, flowcharts, orgcharts, UML, BPMN, or business diagrams
33 lines (32 loc) • 1.37 kB
HTML
<html>
<head>
<meta charset="UTF-8">
<title>Non-Realtime Dragging</title>
<meta name="description" content="TypeScript: A modification of DraggingTool to show a ghost image of what is being moved, rather than moving the nodes and links in realtime." />
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Copyright 1998-2020 by Northwoods Software Corporation. -->
<script src="../samples/assets/require.js"></script>
<script src="../assets/js/goSamples.js"></script> <!-- this is only for the GoJS Samples framework -->
<script id="code">
function init() {
require(["NonRealtimeDraggingScript"], function(app) {
app.init();
});
}
</script>
</head>
<body onload="init()">
<div id="sample">
<div id="myDiagramDiv" style="border: solid 1px black; width:100%; height:600px"></div>
<p>
This custom <a>DraggingTool</a> class causes the user to drag around a translucent image of the Nodes and Links being moved,
leaving the selected Parts in place, rather than actually moving those Nodes and Links in realtime.
Only when the mouse up occurs does the move happen.
</p>
<p>
This tool is defined in its own file, as <a href="NonRealtimeDraggingTool.ts">NonRealtimeDraggingTool.ts</a>
</p>
</div>
</body>
</html>