gojs
Version:
Interactive diagrams, charts, and graphs, such as trees, flowcharts, orgcharts, UML, BPMN, or business diagrams
32 lines (31 loc) • 1.26 kB
HTML
<html>
<head>
<title>Rescaling GraphObjects using the RescalingTool</title>
<!-- Copyright 1998-2020 by Northwoods Software Corporation. -->
<meta name="description" content="A demonstration of the RescalingTool extension." />
<meta name="viewport" content="width=device-width, initial-scale=1">
<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(["RescalingScript"], function(app) {
app.init();
});
}
</script>
</head>
<body onload="init()">
<div id="sample">
<div id="myDiagramDiv" style="border: solid 1px black; width:100%; height:400px"></div>
<p>
Selecting a node will show a rescaling handle that when dragged will modify the node's <a>GraphObject.scale</a> property.
</p>
<p>
Just as the <a>ResizingTool</a> changes the <a>GraphObject.desiredSize</a> of an object,
and just as the <a>RotatingTool</a> changes the <a>GraphObject.angle</a> of an object,
the <a>RescalingTool</a> changes the <a>GraphObject.scale</a> of an object.
</p>
</div>
</body>
</html>