1823 lines
71 KiB
HTML
1823 lines
71 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>GoJS® ResizingTool Class</title>
|
|
|
|
<script src="../../assets/js/jquery.min.js"></script>
|
|
<script src="../../assets/js/bootstrap.min.js"></script>
|
|
<script src="../../assets/js/highlight.js"></script>
|
|
<script src="../../assets/js/api.js"></script>
|
|
|
|
<link href="../../assets/css/bootstrap.min.css" rel="stylesheet" >
|
|
<!-- custom CSS after bootstrap -->
|
|
<link href="../../assets/css/main.css" rel="stylesheet" type="text/css"/>
|
|
<link href="../../assets/css/api.css" rel="stylesheet" type="text/css"/>
|
|
<!--<link rel="stylesheet" href="../../assets/css/api.css" type="text/css" media="all" />-->
|
|
<link rel="stylesheet" href="../../assets/css/highlight.css" type="text/css" media="all" />
|
|
|
|
</head>
|
|
|
|
<body>
|
|
<!-- non-fixed navbar -->
|
|
<nav id="non-fixed-nav" class="navbar navbar-inverse navbar-top">
|
|
<div class="container-fluid">
|
|
<div class="navbar-header">
|
|
<div class="navheader-container">
|
|
<div class="navheader-collapse" data-toggle="collapse" data-target="#navbar">
|
|
<a id="toplogo" class="navbar-brand" href="../../index.html">GoJS</a>
|
|
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar">
|
|
<span class="sr-only">Toggle navigation</span>
|
|
<span class="icon-bar"></span>
|
|
<span class="icon-bar"></span>
|
|
<span class="icon-bar"></span>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="navbar" class="navbar-collapse collapse">
|
|
<ul class="nav navbar-nav navbar-right">
|
|
<li><a href="../../index.html">Home</a></li>
|
|
<li><a href="../../learn/index.html">Learn</a></li>
|
|
<li><a href="../../samples/index.html">Samples</a></li>
|
|
<li><a href="../../intro/index.html">Intro</a></li>
|
|
<li><a href="../../api/index.html">API</a></li>
|
|
<li><a href="https://www.nwoods.com/components/evalform.htm">Register</a></li>
|
|
<li><a href="../../doc/download.html">Download</a></li>
|
|
<li><a href="https://forum.nwoods.com/c/gojs">Forum</a></li>
|
|
<li><a href="https://www.nwoods.com/contact.html" onclick="ga('send','event','Outbound Link','click','contact');">Contact</a></li>
|
|
<li class="buy"><a href="https://www.nwoods.com/sales/index.html" onclick="ga('send','event','Outbound Link','click','buy');">Buy</a></li>
|
|
<li class="activate"><a href="https://www.nwoods.com/app/activate.aspx?sku=gojs">Activate</a></li>
|
|
</ul>
|
|
</div><!--/.nav-collapse -->
|
|
</div>
|
|
</nav>
|
|
|
|
|
|
<div class="container-fluid">
|
|
|
|
<!-- ============================== classes index ============================ -->
|
|
<div id="navindex" class="col-md-2">
|
|
<!-- begin publish.classesIndex -->
|
|
<!-- <div><a href="../index.html">GoJS Class Index</a></div> -->
|
|
|
|
<div class="sidebar-nav">
|
|
<div class="navbar navbar-default" role="navigation">
|
|
<div class="navbar-header">
|
|
<div class="navheader-container">
|
|
<div class="navheader-collapse" data-toggle="collapse" data-target="#DiagramNavbar">
|
|
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#DiagramNavbar">
|
|
<span class="sr-only">Toggle navigation</span>
|
|
<span class="icon-bar"></span>
|
|
<span class="icon-bar"></span>
|
|
<span class="icon-bar"></span>
|
|
</button>
|
|
</div>
|
|
<span class="navbar-brand">Diagram Classes</span>
|
|
</div>
|
|
</div>
|
|
<div id="DiagramNavbar" class="navbar-collapse collapse sidebar-navbar-collapse">
|
|
<ul class="classList nav navbar-nav">
|
|
|
|
|
|
|
|
|
|
|
|
<li><a href="../symbols/Adornment.html" class="linkConstructor">Adornment</a></li>
|
|
|
|
<li><a href="../symbols/AnimationManager.html" class="linkConstructor">AnimationManager</a></li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li><a href="../symbols/CommandHandler.html" class="linkConstructor">CommandHandler</a></li>
|
|
|
|
|
|
|
|
<li><a href="../symbols/Diagram.html" class="linkConstructor">Diagram</a></li>
|
|
|
|
<li><a href="../symbols/DiagramEvent.html" class="linkConstructor">DiagramEvent</a></li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li><a href="../symbols/GraphObject.html" class="linkConstructor">GraphObject</a></li>
|
|
|
|
|
|
|
|
<li><a href="../symbols/Group.html" class="linkConstructor">Group</a></li>
|
|
|
|
|
|
|
|
<li><a href="../symbols/InputEvent.html" class="linkConstructor">InputEvent</a></li>
|
|
|
|
|
|
|
|
|
|
|
|
<li><a href="../symbols/Layer.html" class="linkConstructor">Layer</a></li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li><a href="../symbols/Link.html" class="linkConstructor">Link</a></li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li><a href="../symbols/Node.html" class="linkConstructor">Node</a></li>
|
|
|
|
<li><a href="../symbols/Overview.html" class="linkConstructor">Overview</a></li>
|
|
|
|
<li><a href="../symbols/Palette.html" class="linkConstructor">Palette</a></li>
|
|
|
|
<li><a href="../symbols/Panel.html" class="linkConstructor">Panel</a></li>
|
|
|
|
|
|
|
|
<li><a href="../symbols/Part.html" class="linkConstructor">Part</a></li>
|
|
|
|
|
|
|
|
|
|
|
|
<li><a href="../symbols/Picture.html" class="linkConstructor">Picture</a></li>
|
|
|
|
<li><a href="../symbols/Placeholder.html" class="linkConstructor">Placeholder</a></li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li><a href="../symbols/RowColumnDefinition.html" class="linkConstructor">RowColumnDefinition</a></li>
|
|
|
|
|
|
|
|
<li><a href="../symbols/Shape.html" class="linkConstructor">Shape</a></li>
|
|
|
|
|
|
|
|
|
|
|
|
<li><a href="../symbols/TextBlock.html" class="linkConstructor">TextBlock</a></li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="navbar navbar-default" role="navigation">
|
|
<div class="navbar-header">
|
|
<div class="navheader-container">
|
|
<div class="navheader-collapse" data-toggle="collapse" data-target="#GeometryNavbar">
|
|
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#GeometryNavbar">
|
|
<span class="sr-only">Toggle navigation</span>
|
|
<span class="icon-bar"></span>
|
|
<span class="icon-bar"></span>
|
|
<span class="icon-bar"></span>
|
|
</button>
|
|
</div>
|
|
<span class="navbar-brand">Geometry Classes</span>
|
|
</div>
|
|
</div>
|
|
<div id="GeometryNavbar" class="navbar-collapse collapse sidebar-navbar-collapse">
|
|
<ul class="classList nav navbar-nav">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li><a href="../symbols/Brush.html" class="linkConstructor">Brush</a></li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li><a href="../symbols/Geometry.html" class="linkConstructor">Geometry</a></li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li><a href="../symbols/Margin.html" class="linkConstructor">Margin</a></li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li><a href="../symbols/PathFigure.html" class="linkConstructor">PathFigure</a></li>
|
|
|
|
<li><a href="../symbols/PathSegment.html" class="linkConstructor">PathSegment</a></li>
|
|
|
|
|
|
|
|
|
|
|
|
<li><a href="../symbols/Point.html" class="linkConstructor">Point</a></li>
|
|
|
|
<li><a href="../symbols/Rect.html" class="linkConstructor">Rect</a></li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li><a href="../symbols/Size.html" class="linkConstructor">Size</a></li>
|
|
|
|
<li><a href="../symbols/Spot.html" class="linkConstructor">Spot</a></li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="navbar navbar-default" role="navigation">
|
|
<div class="navbar-header">
|
|
<div class="navheader-container">
|
|
<div class="navheader-collapse" data-toggle="collapse" data-target="#ModelNavbar">
|
|
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#ModelNavbar">
|
|
<span class="sr-only">Toggle navigation</span>
|
|
<span class="icon-bar"></span>
|
|
<span class="icon-bar"></span>
|
|
<span class="icon-bar"></span>
|
|
</button>
|
|
</div>
|
|
<span class="navbar-brand">Model Classes</span>
|
|
</div>
|
|
</div>
|
|
<div id="ModelNavbar" class="navbar-collapse collapse sidebar-navbar-collapse">
|
|
<ul class="classList nav navbar-nav">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li><a href="../symbols/Binding.html" class="linkConstructor">Binding</a></li>
|
|
|
|
|
|
|
|
<li><a href="../symbols/ChangedEvent.html" class="linkConstructor">ChangedEvent</a></li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li><a href="../symbols/GraphLinksModel.html" class="linkConstructor">GraphLinksModel</a></li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li><a href="../symbols/Model.html" class="linkConstructor">Model</a></li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li><a href="../symbols/Transaction.html" class="linkConstructor">Transaction</a></li>
|
|
|
|
|
|
|
|
|
|
|
|
<li><a href="../symbols/TreeModel.html" class="linkConstructor">TreeModel</a></li>
|
|
|
|
|
|
|
|
<li><a href="../symbols/UndoManager.html" class="linkConstructor">UndoManager</a></li>
|
|
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="navbar navbar-default" role="navigation">
|
|
<div class="navbar-header">
|
|
<div class="navheader-container">
|
|
<div class="navheader-collapse" data-toggle="collapse" data-target="#LayoutNavbar">
|
|
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#LayoutNavbar">
|
|
<span class="sr-only">Toggle navigation</span>
|
|
<span class="icon-bar"></span>
|
|
<span class="icon-bar"></span>
|
|
<span class="icon-bar"></span>
|
|
</button>
|
|
</div>
|
|
<span class="navbar-brand">Layout Classes</span>
|
|
</div>
|
|
</div>
|
|
<div id="LayoutNavbar" class="navbar-collapse collapse sidebar-navbar-collapse">
|
|
<ul class="classList nav navbar-nav">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li><a href="../symbols/CircularLayout.html" class="linkConstructor">CircularLayout</a></li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li><a href="../symbols/ForceDirectedLayout.html" class="linkConstructor">ForceDirectedLayout</a></li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li><a href="../symbols/GridLayout.html" class="linkConstructor">GridLayout</a></li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li><a href="../symbols/LayeredDigraphLayout.html" class="linkConstructor">LayeredDigraphLayout</a></li>
|
|
|
|
|
|
|
|
<li><a href="../symbols/Layout.html" class="linkConstructor">Layout</a></li>
|
|
|
|
|
|
|
|
<li><a href="../symbols/LayoutNetwork.html" class="linkConstructor">LayoutNetwork</a></li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li><a href="../symbols/TreeLayout.html" class="linkConstructor">TreeLayout</a></li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="navbar navbar-default" role="navigation">
|
|
<div class="navbar-header">
|
|
<div class="navheader-container">
|
|
<div class="navheader-collapse" data-toggle="collapse" data-target="#ToolNavbar">
|
|
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#ToolNavbar">
|
|
<span class="sr-only">Toggle navigation</span>
|
|
<span class="icon-bar"></span>
|
|
<span class="icon-bar"></span>
|
|
<span class="icon-bar"></span>
|
|
</button>
|
|
</div>
|
|
<span class="navbar-brand">Tool Classes</span>
|
|
</div>
|
|
</div>
|
|
<div id="ToolNavbar" class="navbar-collapse collapse sidebar-navbar-collapse">
|
|
<ul class="classList nav navbar-nav">
|
|
|
|
|
|
|
|
<li><a href="../symbols/ActionTool.html" class="linkConstructor">ActionTool</a></li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li><a href="../symbols/ClickCreatingTool.html" class="linkConstructor">ClickCreatingTool</a></li>
|
|
|
|
<li><a href="../symbols/ClickSelectingTool.html" class="linkConstructor">ClickSelectingTool</a></li>
|
|
|
|
|
|
|
|
<li><a href="../symbols/ContextMenuTool.html" class="linkConstructor">ContextMenuTool</a></li>
|
|
|
|
|
|
|
|
|
|
|
|
<li><a href="../symbols/DraggingTool.html" class="linkConstructor">DraggingTool</a></li>
|
|
|
|
<li><a href="../symbols/DragSelectingTool.html" class="linkConstructor">DragSelectingTool</a></li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li><a href="../symbols/HTMLInfo.html" class="linkConstructor">HTMLInfo</a></li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li><a href="../symbols/LinkingBaseTool.html" class="linkConstructor">LinkingBaseTool</a></li>
|
|
|
|
<li><a href="../symbols/LinkingTool.html" class="linkConstructor">LinkingTool</a></li>
|
|
|
|
<li><a href="../symbols/LinkReshapingTool.html" class="linkConstructor">LinkReshapingTool</a></li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li><a href="../symbols/PanningTool.html" class="linkConstructor">PanningTool</a></li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li><a href="../symbols/RelinkingTool.html" class="linkConstructor">RelinkingTool</a></li>
|
|
|
|
<li><a href="../symbols/ResizingTool.html" class="linkConstructor">ResizingTool</a></li>
|
|
|
|
<li><a href="../symbols/RotatingTool.html" class="linkConstructor">RotatingTool</a></li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li><a href="../symbols/TextEditingTool.html" class="linkConstructor">TextEditingTool</a></li>
|
|
|
|
<li><a href="../symbols/Tool.html" class="linkConstructor">Tool</a></li>
|
|
|
|
<li><a href="../symbols/ToolManager.html" class="linkConstructor">ToolManager</a></li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="navbar navbar-default" role="navigation">
|
|
<div class="navbar-header">
|
|
<div class="navheader-container">
|
|
<div class="navheader-collapse" data-toggle="collapse" data-target="#CollectionNavbar">
|
|
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#CollectionNavbar">
|
|
<span class="sr-only">Toggle navigation</span>
|
|
<span class="icon-bar"></span>
|
|
<span class="icon-bar"></span>
|
|
<span class="icon-bar"></span>
|
|
</button>
|
|
</div>
|
|
<span class="navbar-brand">Collection Classes</span>
|
|
</div>
|
|
</div>
|
|
<div id="CollectionNavbar" class="navbar-collapse collapse sidebar-navbar-collapse">
|
|
<ul class="classList nav navbar-nav">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li><a href="../symbols/Iterable.html" class="linkConstructor">Iterable</a></li>
|
|
|
|
<li><a href="../symbols/Iterator.html" class="linkConstructor">Iterator</a></li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li><a href="../symbols/List.html" class="linkConstructor">List</a></li>
|
|
|
|
<li><a href="../symbols/Map.html" class="linkConstructor">Map</a></li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li><a href="../symbols/Set.html" class="linkConstructor">Set</a></li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div> <!-- /class="sidebar-nav -->
|
|
|
|
|
|
|
|
|
|
<!-- end publish.classesIndex -->
|
|
</div>
|
|
|
|
<div id="contentBody" class="col-md-10">
|
|
<!-- ============================== header ================================= -->
|
|
<div id="header" class="fineprint mt30">
|
|
<b>GoJS</b>® Diagramming Components<br/>version 1.8.5 for JavaScript/HTML<br/>by <a href="https://www.nwoods.com/">Northwoods Software®</a>
|
|
</div>
|
|
|
|
<!-- ============================== class title ============================ -->
|
|
<h2 class="classTitle mt30">
|
|
|
|
Class ResizingTool
|
|
|
|
</h2>
|
|
|
|
<!-- ============================== class summary ========================== -->
|
|
<span class="hideshowall">
|
|
<span class="nodetails"><button id="buttonShow">Show Details</button></span>
|
|
<span class="details"><button id="buttonHide">Show Summaries</button></span>
|
|
</span>
|
|
|
|
<p class="classsummary">
|
|
|
|
<span class="extends"> Extends
|
|
<a href="../symbols/Tool.html" class="linkConstructor">Tool</a>.</span>
|
|
|
|
|
|
The ResizingTool is used to interactively change the size of a <a href="../symbols/GraphObject.html" class="linkConstructor">GraphObject</a>
|
|
in the selected <a href="../symbols/Part.html" class="linkConstructor">Part</a> or <a href="../symbols/Node.html" class="linkConstructor">Node</a> by setting its <a href="../symbols/GraphObject.html#desiredSize" class="linkProperty">GraphObject.desiredSize</a> property.
|
|
You may want to save the size to the model by using a TwoWay <a href="../symbols/Binding.html" class="linkConstructor">Binding</a> on the "desiredSize" property
|
|
of the GraphObject that is named by <a href="../symbols/Part.html#resizeObjectName" class="linkProperty">Part.resizeObjectName</a>.
|
|
This tool does not operate on <a href="../symbols/Link.html" class="linkConstructor">Link</a>s.
|
|
<p>
|
|
You can limit the permitted minimum and maximum dimensions by setting
|
|
<a href="../symbols/ResizingTool.html#minSize" class="linkProperty">minSize</a> and <a href="../symbols/ResizingTool.html#maxSize" class="linkProperty">maxSize</a>.
|
|
The resizing will also respect the <a href="../symbols/GraphObject.html#minSize" class="linkProperty">GraphObject.minSize</a> and
|
|
<a href="../symbols/GraphObject.html#maxSize" class="linkProperty">GraphObject.maxSize</a> properties.
|
|
Width or height values that are NaN do not constrain the resizing.
|
|
Override <a href="../symbols/ResizingTool.html#computeMinSize" class="linkMethod">computeMinSize</a> and/or <a href="../symbols/ResizingTool.html#computeMaxSize" class="linkMethod">computeMaxSize</a> to change this behavior.
|
|
<p>
|
|
You can also limit the width and/or height to be multiples of a particular size by
|
|
setting <a href="../symbols/Part.html#resizeCellSize" class="linkProperty">Part.resizeCellSize</a>.
|
|
If either or both of these values are NaN, as they are by default,
|
|
it will get the values from this tool's <a href="../symbols/ResizingTool.html#cellSize" class="linkProperty">cellSize</a>.
|
|
Then if either or both of the width and height are still NaN,
|
|
and if <a href="../symbols/DraggingTool.html#isGridSnapEnabled" class="linkProperty">DraggingTool.isGridSnapEnabled</a> is true,
|
|
it will use the <a href="../symbols/DraggingTool.html#gridSnapCellSize" class="linkProperty">DraggingTool.gridSnapCellSize</a>.
|
|
Finally it will consider the <a href="../symbols/Diagram.html#grid" class="linkProperty">Diagram.grid</a>'s <a href="../symbols/Panel.html#gridCellSize" class="linkProperty">Panel.gridCellSize</a>
|
|
if <a href="../symbols/ResizingTool.html#isGridSnapEnabled" class="linkProperty">isGridSnapEnabled</a> is true.
|
|
Override <a href="../symbols/ResizingTool.html#computeCellSize" class="linkMethod">computeCellSize</a> to change this behavior.
|
|
<p>
|
|
Pressing the Shift key or resizing a <a href="../symbols/Shape.html" class="linkConstructor">Shape</a> with a <a href="../symbols/Shape.html#geometryStretch" class="linkProperty">Shape.geometryStretch</a> of
|
|
<a href="../symbols/GraphObject.html#Uniform" class="linkConstant">GraphObject.Uniform</a> or <a href="../symbols/GraphObject.html#UniformToFill" class="linkConstant">GraphObject.UniformToFill</a> will maintain the aspect ratio during the resize.
|
|
Override <a href="../symbols/ResizingTool.html#computeReshape" class="linkMethod">computeReshape</a> to change this behavior.
|
|
<p>
|
|
This tool makes use of an <a href="../symbols/Adornment.html" class="linkConstructor">Adornment</a>, shown when the <a href="../symbols/Part.html" class="linkConstructor">Part</a> or <a href="../symbols/Node.html" class="linkConstructor">Node</a> is selected,
|
|
that includes some number of resize handles.
|
|
The resize handles are normally copies of <a href="../symbols/ResizingTool.html#handleArchetype" class="linkProperty">ResizingTool.handleArchetype</a>,
|
|
unless you specify a custom resize Adornment by setting <a href="../symbols/Part.html#resizeAdornmentTemplate" class="linkProperty">Part.resizeAdornmentTemplate</a>.
|
|
The resize Adornment is normally a "Spot" Panel with eight resize handles,
|
|
each with <a href="../symbols/GraphObject.html#alignment" class="linkProperty">GraphObject.alignment</a> set to one of the eight standard <a href="../symbols/Spot.html" class="linkConstructor">Spot</a> values --
|
|
the four corners and the four side middles.
|
|
The <a href="../symbols/GraphObject.html#alignment" class="linkProperty">GraphObject.alignment</a> is what identifies and distinguishes each of the handles and
|
|
the behavior when the user drags the handle.
|
|
<p>
|
|
This tool conducts a transaction while the tool is active.
|
|
A successful resizing will result in a "PartResized" <a href="../symbols/DiagramEvent.html" class="linkConstructor">DiagramEvent</a> and a "Resizing" transaction.
|
|
<p class="boxread">
|
|
For a general discussion of the sizing of objects, see: <a href="../../intro/sizing.html">Introduction to the sizing of GraphObjects</a>.
|
|
For customizing the ResizingTool, see <a href="../../intro/tools.html#ResizingTool">Introduction to the ResizingTool</a>.
|
|
</p>
|
|
|
|
<!-- ============================== constructor summary ==================== -->
|
|
|
|
<h2 id="constructor" class="summaryCaption"> Constructor <span class="nodetails"> Summary</span><span class="details"> Details</span></h2>
|
|
<div class="table-responsive">
|
|
<table class="summaryTable table table-bordered table-condensed" summary="A summary of the constructor documented in the class ResizingTool.">
|
|
<thead>
|
|
<tr>
|
|
<th scope="col" class="name">Name</th>
|
|
<th scope="col" class="description">Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td class="name" >
|
|
<div class="name">
|
|
ResizingTool()
|
|
</div>
|
|
</td>
|
|
<td class="description">
|
|
<div class="description">
|
|
<!--newp--><p><p>You do not normally need to create an instance of this tool
|
|
because one already exists as the <a href="../symbols/ToolManager.html#resizingTool" class="linkProperty">ToolManager.resizingTool</a>, which you can modify.<span class="nodetails" id="xconResizingTool"><a class="morelink" onclick="hst('conResizingTool')">More...</a></span> <span class="details" id="conResizingTool">
|
|
</span><div class="details" id="dconResizingTool"><p>
|
|
The <a href="../symbols/Tool.html#name" class="linkProperty">Tool.name</a> of this tool is "Resizing".</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div><!-- class="table-responsive">-->
|
|
|
|
|
|
<!-- ============================== properties summary ===================== -->
|
|
|
|
|
|
|
|
<h2 class="summaryCaption">Properties<span class="nodetails"> Summary</span><span class="details"> Details</span></h2>
|
|
<div class="table-responsive">
|
|
<table class="summaryTable table table-bordered table-condensed" summary="A summary of the properties documented in the class ResizingTool.">
|
|
<thead>
|
|
<tr>
|
|
<th scope="col" class="name">Name, Value Type</th>
|
|
<th scope="col" class="description">Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
|
|
<tr id="adornedObject" >
|
|
|
|
<td class="name">
|
|
<div class="name">
|
|
adornedObject
|
|
</div>
|
|
<div class="attributes">
|
|
<span class="light">{<a href="../symbols/GraphObject.html" class="linkConstructor">GraphObject</a>}</span>
|
|
|
|
</div>
|
|
</td>
|
|
<td class="description">
|
|
<div class="description">
|
|
<!--newp <p> -->
|
|
<p>Gets the <a href="../symbols/GraphObject.html" class="linkConstructor">GraphObject</a> that is being resized.<span class="nodetails" id="xpropadornedObject"><a class="morelink" onclick="hst('propadornedObject')">More...</a></span> <span class="details" id="propadornedObject">
|
|
This may be the same object as the selected <a href="../symbols/Part.html" class="linkConstructor">Part</a> or it may be contained within that Part.
|
|
</span><div class="details" id="dpropadornedObject"><p>
|
|
This property is also settable, but should only be set when overriding functions
|
|
in ResizingTool, and not during normal operation.</div>
|
|
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr id="cellSize" >
|
|
|
|
<td class="name">
|
|
<div class="name">
|
|
cellSize
|
|
</div>
|
|
<div class="attributes">
|
|
<span class="light">{<a href="../symbols/Size.html" class="linkConstructor">Size</a>}</span>
|
|
|
|
</div>
|
|
</td>
|
|
<td class="description">
|
|
<div class="description">
|
|
<!--newp <p> -->
|
|
<p>Gets or sets the width and height multiples with which the user must resize.<span class="nodetails" id="xpropcellSize"><a class="morelink" onclick="hst('propcellSize')">More...</a></span> <span class="details" id="propcellSize">
|
|
The effective cell size is computed by first looking at the <a href="../symbols/Adornment.html#adornedPart" class="linkProperty">Adornment.adornedPart</a>'s <a href="../symbols/Part.html#resizeCellSize" class="linkProperty">Part.resizeCellSize</a>.
|
|
If either or both of its width and height are NaN, it will use this property, <code>cellSize</code>.
|
|
If either or both of this property's width and height are NaN, it will
|
|
consider the <a href="../symbols/DraggingTool.html#gridSnapCellSize" class="linkProperty">DraggingTool.gridSnapCellSize</a> and the <a href="../symbols/Diagram.html#grid" class="linkProperty">Diagram.grid</a>'s <a href="../symbols/Panel.html#gridCellSize" class="linkProperty">Panel.gridCellSize</a>.
|
|
</span><div class="details" id="dpropcellSize"><p>
|
|
The default value is NaN x NaN.
|
|
Setting this property does not raise any events.</div>
|
|
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr id="handle" >
|
|
|
|
<td class="name">
|
|
<div class="name">
|
|
handle
|
|
</div>
|
|
<div class="attributes">
|
|
<span class="light">{<a href="../symbols/GraphObject.html" class="linkConstructor">GraphObject</a>}</span>
|
|
|
|
</div>
|
|
</td>
|
|
<td class="description">
|
|
<div class="description">
|
|
<!--newp <p> -->
|
|
<p>This read-only property returns the <a href="../symbols/GraphObject.html" class="linkConstructor">GraphObject</a> that is the tool handle being dragged by the user.<span class="nodetails" id="xprophandle"><a class="morelink" onclick="hst('prophandle')">More...</a></span> <span class="details" id="prophandle">
|
|
This will be contained by an <a href="../symbols/Adornment.html" class="linkConstructor">Adornment</a> whose category is "ResizingTool".
|
|
Its <a href="../symbols/Adornment.html#adornedObject" class="linkProperty">Adornment.adornedObject</a> is the same as the <a href="../symbols/ResizingTool.html#adornedObject" class="linkProperty">adornedObject</a>.</span>
|
|
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr id="handleArchetype" >
|
|
|
|
<td class="name">
|
|
<div class="name">
|
|
handleArchetype
|
|
</div>
|
|
<div class="attributes">
|
|
<span class="light">{<a href="../symbols/GraphObject.html" class="linkConstructor">GraphObject</a>}</span>
|
|
|
|
</div>
|
|
</td>
|
|
<td class="description">
|
|
<div class="description">
|
|
<!--newp <p> -->
|
|
<p>Gets or sets a small GraphObject that is copied as a resizing handle for the selected part.<span class="nodetails" id="xprophandleArchetype"><a class="morelink" onclick="hst('prophandleArchetype')">More...</a></span> <span class="details" id="prophandleArchetype">
|
|
By default this is a <a href="../symbols/Shape.html" class="linkConstructor">Shape</a> that is a small blue rectangle.
|
|
Setting this property does not raise any events.
|
|
</span><div class="details" id="dprophandleArchetype"><p>
|
|
Here is an example of changing the default handle to be larger yellow circles:
|
|
<pre class="javascript">
|
|
myDiagram.toolManager.resizingTool.handleArchetype =
|
|
$(go.Shape, "Circle",
|
|
{ width: 10, height: 10, fill: "yellow" });
|
|
</pre>
|
|
<p>
|
|
This property is ignored when a custom resizing Adornment is specified as the <a href="../symbols/Part.html#resizeAdornmentTemplate" class="linkProperty">Part.resizeAdornmentTemplate</a>.
|
|
That property is normally null, in which case this tool will automatically construct Adornments
|
|
holding eight copies of this handle archetype, each with a <a href="../symbols/GraphObject.html#alignment" class="linkProperty">GraphObject.alignment</a> being one of the
|
|
standard eight <a href="../symbols/Spot.html" class="linkConstructor">Spot</a>s.</div>
|
|
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr id="isGridSnapEnabled" >
|
|
|
|
<td class="name">
|
|
<div class="name">
|
|
isGridSnapEnabled
|
|
</div>
|
|
<div class="attributes">
|
|
<span class="light">{boolean}</span>
|
|
|
|
</div>
|
|
</td>
|
|
<td class="description">
|
|
<div class="description">
|
|
<!--newp <p> -->
|
|
<p>Gets or sets whether the <a href="../symbols/ResizingTool.html" class="linkConstructor">ResizingTool</a> snaps object sizes to the diagram's background grid during the resize.<span class="nodetails" id="xpropisGridSnapEnabled"><a class="morelink" onclick="hst('propisGridSnapEnabled')">More...</a></span> <span class="details" id="propisGridSnapEnabled">
|
|
By default this property is false.
|
|
Setting this property does not raise any events.</span>
|
|
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr id="maxSize" >
|
|
|
|
<td class="name">
|
|
<div class="name">
|
|
maxSize
|
|
</div>
|
|
<div class="attributes">
|
|
<span class="light">{<a href="../symbols/Size.html" class="linkConstructor">Size</a>}</span>
|
|
|
|
</div>
|
|
</td>
|
|
<td class="description">
|
|
<div class="description">
|
|
<!--newp <p> -->
|
|
<p>Gets or sets the maximum size to which the user can resize.<span class="nodetails" id="xpropmaxSize"><a class="morelink" onclick="hst('propmaxSize')">More...</a></span> <span class="details" id="propmaxSize">
|
|
The effective maximum size is the minimum of this value and the <a href="../symbols/GraphObject.html#maxSize" class="linkProperty">GraphObject.maxSize</a>,
|
|
independently in each direction.
|
|
</span><div class="details" id="dpropmaxSize"><p>
|
|
The default value is 9999 x 9999.
|
|
Any new value must be of type Size; NaN width or height values are treated as Infinity.
|
|
Setting this property does not raise any events.</div>
|
|
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr id="minSize" >
|
|
|
|
<td class="name">
|
|
<div class="name">
|
|
minSize
|
|
</div>
|
|
<div class="attributes">
|
|
<span class="light">{<a href="../symbols/Size.html" class="linkConstructor">Size</a>}</span>
|
|
|
|
</div>
|
|
</td>
|
|
<td class="description">
|
|
<div class="description">
|
|
<!--newp <p> -->
|
|
<p>Gets or sets the minimum size to which the user can resize.<span class="nodetails" id="xpropminSize"><a class="morelink" onclick="hst('propminSize')">More...</a></span> <span class="details" id="propminSize">
|
|
The effective minimum size is the maximum of this value and the <a href="../symbols/GraphObject.html#minSize" class="linkProperty">GraphObject.minSize</a>,
|
|
independently in each direction.
|
|
</span><div class="details" id="dpropminSize"><p>
|
|
The default value is 1 x 1.
|
|
Any new value must be of type Size; NaN width or height values are treated as zero.
|
|
Setting this property does not raise any events.</div>
|
|
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr id="originalDesiredSize" >
|
|
|
|
<td class="name">
|
|
<div class="name">
|
|
originalDesiredSize
|
|
</div>
|
|
<div class="attributes">
|
|
<span class="light">{<a href="../symbols/Size.html" class="linkConstructor">Size</a>}</span>
|
|
|
|
<span class="since" title="since">1.1</span>
|
|
|
|
</div>
|
|
</td>
|
|
<td class="description">
|
|
<div class="description">
|
|
<!--newp <p> -->
|
|
<p>This read-only property returns the <a href="../symbols/Size.html" class="linkConstructor">Size</a> that was the original value of the <a href="../symbols/GraphObject.html#desiredSize" class="linkProperty">GraphObject.desiredSize</a>
|
|
of the element that is being resized.
|
|
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr id="originalLocation" >
|
|
|
|
<td class="name">
|
|
<div class="name">
|
|
originalLocation
|
|
</div>
|
|
<div class="attributes">
|
|
<span class="light">{<a href="../symbols/Point.html" class="linkConstructor">Point</a>}</span>
|
|
|
|
<span class="since" title="since">1.1</span>
|
|
|
|
</div>
|
|
</td>
|
|
<td class="description">
|
|
<div class="description">
|
|
<!--newp <p> -->
|
|
<p>This read-only property returns the <a href="../symbols/Point.html" class="linkConstructor">Point</a> that was the original value of the <a href="../symbols/Part.html#location" class="linkProperty">Part.location</a>
|
|
of the Part that is being resized.
|
|
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
|
|
</tbody>
|
|
</table>
|
|
</div><!-- class="table-responsive">-->
|
|
|
|
|
|
|
|
<dl class="inheritsList">
|
|
<dt>Properties borrowed from class <a href="../symbols/Tool.html" class="linkConstructor">Tool</a>: </dt><dd><a href="../symbols/Tool.html#diagram" class="linkProperty">diagram</a>, <a href="../symbols/Tool.html#isActive" class="linkProperty">isActive</a>, <a href="../symbols/Tool.html#isEnabled" class="linkProperty">isEnabled</a>, <a href="../symbols/Tool.html#name" class="linkProperty">name</a>, <a href="../symbols/Tool.html#transactionResult" class="linkProperty">transactionResult</a></dd>
|
|
</dl>
|
|
|
|
|
|
|
|
<!-- ============================== methods summary ======================== -->
|
|
|
|
|
|
|
|
<h2 class="summaryCaption">Method <span class="nodetails"> Summary</span><span class="details"> Details</span></h2>
|
|
<div class="table-responsive">
|
|
<table class="summaryTable table table-bordered table-condensed" summary="A summary of the methods documented in the class ResizingTool.">
|
|
<thead>
|
|
<tr>
|
|
<th scope="col" class="name">Name, Return Type</th>
|
|
<th scope="col" class="description">Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
|
|
<tr id="canStart">
|
|
<td class="name">
|
|
|
|
<div class="name">
|
|
canStart()
|
|
</div>
|
|
<div class="attributes">
|
|
<span class="light">{boolean}</span>
|
|
|
|
</div>
|
|
</td>
|
|
<td class="description">
|
|
<div class="description">
|
|
<!--newp--><p><p>This tool may run when there is a mouse-down event on a resize handle,
|
|
the diagram is not read-only and it allows resizing,
|
|
the left mouse button is being used,
|
|
and this tool's adornment's resize handle is at the current mouse point.<span class="nodetails" id="xmethcanStart"><a class="morelink" onclick="hst('methcanStart')">More...</a></span> <span class="details" id="methcanStart">
|
|
</span><div class="details" id="dmethcanStart"><p>
|
|
This method may be overridden.</div>
|
|
|
|
|
|
|
|
<dl class="detailList">
|
|
<dt class="heading">Returns:</dt>
|
|
|
|
<dt><span class="light fixedFont">{boolean}</span> </dt>
|
|
|
|
</dl>
|
|
|
|
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr id="computeCellSize">
|
|
<td class="name">
|
|
|
|
<div class="name">
|
|
computeCellSize()
|
|
</div>
|
|
<div class="attributes">
|
|
<span class="light">{<a href="../symbols/Size.html" class="linkConstructor">Size</a>}</span>
|
|
|
|
</div>
|
|
</td>
|
|
<td class="description">
|
|
<div class="description">
|
|
<!--newp--><p><p>The size should be a multiple of the value returned by this method.<span class="nodetails" id="xmethcomputeCellSize"><a class="morelink" onclick="hst('methcomputeCellSize')">More...</a></span> <span class="details" id="methcomputeCellSize">
|
|
</span><div class="details" id="dmethcomputeCellSize"><p>
|
|
This is called once when the tool is activated.
|
|
<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.</div>
|
|
|
|
|
|
|
|
<dl class="detailList">
|
|
<dt class="heading">Returns:</dt>
|
|
|
|
<dt><span class="light fixedFont">{<a href="../symbols/Size.html" class="linkConstructor">Size</a>}</span> </dt>
|
|
|
|
</dl>
|
|
|
|
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr id="computeMaxSize">
|
|
<td class="name">
|
|
|
|
<div class="name">
|
|
computeMaxSize()
|
|
</div>
|
|
<div class="attributes">
|
|
<span class="light">{<a href="../symbols/Size.html" class="linkConstructor">Size</a>}</span>
|
|
|
|
</div>
|
|
</td>
|
|
<td class="description">
|
|
<div class="description">
|
|
<!--newp--><p><p>The effective maximum resizing size is the minimum of the <a href="../symbols/ResizingTool.html#maxSize" class="linkProperty">maxSize</a> and the
|
|
<a href="../symbols/ResizingTool.html#adornedObject" class="linkProperty">adornedObject</a>'s <a href="../symbols/GraphObject.html#maxSize" class="linkProperty">GraphObject.maxSize</a>.<span class="nodetails" id="xmethcomputeMaxSize"><a class="morelink" onclick="hst('methcomputeMaxSize')">More...</a></span> <span class="details" id="methcomputeMaxSize">
|
|
</span><div class="details" id="dmethcomputeMaxSize"><p>
|
|
This is called once when the tool is activated.
|
|
<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.</div>
|
|
|
|
|
|
|
|
<dl class="detailList">
|
|
<dt class="heading">Returns:</dt>
|
|
|
|
<dt><span class="light fixedFont">{<a href="../symbols/Size.html" class="linkConstructor">Size</a>}</span> </dt>
|
|
|
|
</dl>
|
|
|
|
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr id="computeMinSize">
|
|
<td class="name">
|
|
|
|
<div class="name">
|
|
computeMinSize()
|
|
</div>
|
|
<div class="attributes">
|
|
<span class="light">{<a href="../symbols/Size.html" class="linkConstructor">Size</a>}</span>
|
|
|
|
</div>
|
|
</td>
|
|
<td class="description">
|
|
<div class="description">
|
|
<!--newp--><p><p>The effective minimum resizing size is the maximum of <a href="../symbols/ResizingTool.html#minSize" class="linkProperty">minSize</a> and the
|
|
<a href="../symbols/ResizingTool.html#adornedObject" class="linkProperty">adornedObject</a>'s <a href="../symbols/GraphObject.html#minSize" class="linkProperty">GraphObject.minSize</a>.<span class="nodetails" id="xmethcomputeMinSize"><a class="morelink" onclick="hst('methcomputeMinSize')">More...</a></span> <span class="details" id="methcomputeMinSize">
|
|
</span><div class="details" id="dmethcomputeMinSize"><p>
|
|
This is called once when the tool is activated.
|
|
<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.</div>
|
|
|
|
|
|
|
|
<dl class="detailList">
|
|
<dt class="heading">Returns:</dt>
|
|
|
|
<dt><span class="light fixedFont">{<a href="../symbols/Size.html" class="linkConstructor">Size</a>}</span> </dt>
|
|
|
|
</dl>
|
|
|
|
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr id="computeReshape">
|
|
<td class="name">
|
|
|
|
<div class="name">
|
|
computeReshape()
|
|
</div>
|
|
<div class="attributes">
|
|
<span class="light">{boolean}</span>
|
|
|
|
<span class="since" title="since">1.7</span>
|
|
|
|
</div>
|
|
</td>
|
|
<td class="description">
|
|
<div class="description">
|
|
<!--newp--><p><p>Decide whether to allow arbitrary reshaping or whether to keep the same aspect ratio of the object being resized.<span class="nodetails" id="xmethcomputeReshape"><a class="morelink" onclick="hst('methcomputeReshape')">More...</a></span> <span class="details" id="methcomputeReshape">
|
|
If the <a href="../symbols/ResizingTool.html#adornedObject" class="linkProperty">adornedObject</a> is a <a href="../symbols/Shape.html" class="linkConstructor">Shape</a>,
|
|
then if the <a href="../symbols/GraphObject.html#stretch" class="linkProperty">GraphObject.stretch</a> is <a href="../symbols/GraphObject.html#Uniform" class="linkConstant">GraphObject.Uniform</a> or <a href="../symbols/GraphObject.html#UniformToFill" class="linkConstant">GraphObject.UniformToFill</a>,
|
|
this method will return false to restrict reshaping to maintain the object's current ratio of height to width.
|
|
Also, if the user is holding down the Shift key, this method will return false.
|
|
</span><div class="details" id="dmethcomputeReshape"><p>
|
|
This is called on each mouse-move and on mouse-up; the result is passed to the call to <a href="../symbols/ResizingTool.html#resize" class="linkMethod">resize</a>.
|
|
This permits the user to change the behavior dynamically during resizing.
|
|
<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.
|
|
For example, to always keep the object's original aspect ratio, override this method to return false.
|
|
When calling <a href="../symbols/GraphObject.html#.make" class="linkStatic">GraphObject.make</a> to initialize a <a href="../symbols/Diagram.html" class="linkConstructor">Diagram</a>:
|
|
<pre class="javascript">
|
|
$(go.Diagram, . . .,
|
|
{
|
|
"resizingTool.computeReshape": function() { return false; },
|
|
. . . })
|
|
</pre>
|
|
Or when overriding the method dynamically:
|
|
<pre class="javascript">
|
|
myDiagram.toolManager.resizingTool.computeReshape = function() { return false; };
|
|
</pre>
|
|
Your override might want to look at the <code>this.adornedObject.part.data</code> properties to decide whether to allow reshaping.</div>
|
|
|
|
|
|
|
|
<dl class="detailList">
|
|
<dt class="heading">Returns:</dt>
|
|
|
|
<dt><span class="light fixedFont">{boolean}</span> true to allow any aspect ratio; false to preserve the <a href="../symbols/ResizingTool.html#adornedObject" class="linkProperty">adornedObject</a>'s height/width ratio</dt>
|
|
|
|
</dl>
|
|
|
|
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr id="computeResize">
|
|
<td class="name">
|
|
|
|
<div class="name">
|
|
computeResize(newPoint, spot, min, max, cell, reshape)
|
|
</div>
|
|
<div class="attributes">
|
|
<span class="light">{<a href="../symbols/Rect.html" class="linkConstructor">Rect</a>}</span>
|
|
|
|
</div>
|
|
</td>
|
|
<td class="description">
|
|
<div class="description">
|
|
<!--newp--><p><p>Given a <a href="../symbols/Spot.html" class="linkConstructor">Spot</a> in the original bounds of the object being resized and a new <a href="../symbols/Point.html" class="linkConstructor">Point</a>,
|
|
compute the new <a href="../symbols/Rect.html" class="linkConstructor">Rect</a>.<span class="nodetails" id="xmethcomputeResize"><a class="morelink" onclick="hst('methcomputeResize')">More...</a></span> <span class="details" id="methcomputeResize">
|
|
</span><div class="details" id="dmethcomputeResize"><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.</div>
|
|
|
|
|
|
<dl class="detailList">
|
|
<dt class="heading">Parameters:</dt>
|
|
|
|
<dt>
|
|
<span class="light fixedFont">{<a href="../symbols/Point.html" class="linkConstructor">Point</a>}</span> <b>newPoint</b>
|
|
|
|
</dt>
|
|
<dd>a Point in local coordinates.</dd>
|
|
|
|
<dt>
|
|
<span class="light fixedFont">{<a href="../symbols/Spot.html" class="linkConstructor">Spot</a>}</span> <b>spot</b>
|
|
|
|
</dt>
|
|
<dd>the alignment spot of the handle being dragged.</dd>
|
|
|
|
<dt>
|
|
<span class="light fixedFont">{<a href="../symbols/Size.html" class="linkConstructor">Size</a>}</span> <b>min</b>
|
|
|
|
</dt>
|
|
<dd>the result of the call to <a href="../symbols/ResizingTool.html#computeMinSize" class="linkMethod">computeMinSize</a>.</dd>
|
|
|
|
<dt>
|
|
<span class="light fixedFont">{<a href="../symbols/Size.html" class="linkConstructor">Size</a>}</span> <b>max</b>
|
|
|
|
</dt>
|
|
<dd>the result of the call to <a href="../symbols/ResizingTool.html#computeMaxSize" class="linkMethod">computeMaxSize</a>.</dd>
|
|
|
|
<dt>
|
|
<span class="light fixedFont">{<a href="../symbols/Size.html" class="linkConstructor">Size</a>}</span> <b>cell</b>
|
|
|
|
</dt>
|
|
<dd>the result of the call to <a href="../symbols/ResizingTool.html#computeCellSize" class="linkMethod">computeCellSize</a>.</dd>
|
|
|
|
<dt>
|
|
<span class="light fixedFont">{boolean}</span> <b>reshape</b>
|
|
|
|
</dt>
|
|
<dd>true if the new size may change the aspect ratio from that of the natural bounds of the <a href="../symbols/ResizingTool.html#adornedObject" class="linkProperty">adornedObject</a>.</dd>
|
|
|
|
</dl>
|
|
|
|
|
|
<dl class="detailList">
|
|
<dt class="heading">Returns:</dt>
|
|
|
|
<dt><span class="light fixedFont">{<a href="../symbols/Rect.html" class="linkConstructor">Rect</a>}</span> a Rectangle in the <a href="../symbols/ResizingTool.html#adornedObject" class="linkProperty">adornedObject</a>'s local coordinates, not in document coordinates</dt>
|
|
|
|
</dl>
|
|
|
|
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr id="doActivate">
|
|
<td class="name">
|
|
|
|
<div class="name">
|
|
doActivate()
|
|
</div>
|
|
<div class="attributes">
|
|
|
|
|
|
</div>
|
|
</td>
|
|
<td class="description">
|
|
<div class="description">
|
|
<!--newp--><p><p>Find the <a href="../symbols/ResizingTool.html#handle" class="linkProperty">handle</a>, remember the object's original bounds,
|
|
save the results of calling <a href="../symbols/ResizingTool.html#computeMinSize" class="linkMethod">computeMinSize</a>, <a href="../symbols/ResizingTool.html#computeMaxSize" class="linkMethod">computeMaxSize</a>, and <a href="../symbols/ResizingTool.html#computeCellSize" class="linkMethod">computeCellSize</a>,
|
|
capture the mouse, and start a transaction.<span class="nodetails" id="xmethdoActivate"><a class="morelink" onclick="hst('methdoActivate')">More...</a></span> <span class="details" id="methdoActivate">
|
|
</span><div class="details" id="dmethdoActivate"><p>
|
|
If the call to <a href="../symbols/Tool.html#findToolHandleAt" class="linkMethod">Tool.findToolHandleAt</a> finds no "Resizing" tool handle, this method returns without activating this tool.</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr id="doCancel">
|
|
<td class="name">
|
|
|
|
<div class="name">
|
|
doCancel()
|
|
</div>
|
|
<div class="attributes">
|
|
|
|
|
|
</div>
|
|
</td>
|
|
<td class="description">
|
|
<div class="description">
|
|
<!--newp--><p><p>Restore the original size of the <a href="../symbols/GraphObject.html" class="linkConstructor">GraphObject</a>.
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr id="doDeactivate">
|
|
<td class="name">
|
|
|
|
<div class="name">
|
|
doDeactivate()
|
|
</div>
|
|
<div class="attributes">
|
|
|
|
|
|
</div>
|
|
</td>
|
|
<td class="description">
|
|
<div class="description">
|
|
<!--newp--><p><p>Stop the current transaction and release the mouse.
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr id="doMouseMove">
|
|
<td class="name">
|
|
|
|
<div class="name">
|
|
doMouseMove()
|
|
</div>
|
|
<div class="attributes">
|
|
|
|
|
|
</div>
|
|
</td>
|
|
<td class="description">
|
|
<div class="description">
|
|
<!--newp--><p><p>Call <a href="../symbols/ResizingTool.html#resize" class="linkMethod">resize</a> with a new size determined by the current mouse point.<span class="nodetails" id="xmethdoMouseMove"><a class="morelink" onclick="hst('methdoMouseMove')">More...</a></span> <span class="details" id="methdoMouseMove">
|
|
This determines the new bounds by calling <a href="../symbols/ResizingTool.html#computeResize" class="linkMethod">computeResize</a>.
|
|
</span><div class="details" id="dmethdoMouseMove"><p>
|
|
When this calls <a href="../symbols/ResizingTool.html#computeResize" class="linkMethod">computeResize</a> it passes as the reshape argument the result of calling <a href="../symbols/ResizingTool.html#computeReshape" class="linkMethod">computeReshape</a>.
|
|
The min, max, and cell arguments will be the saved results of <a href="../symbols/ResizingTool.html#doActivate" class="linkMethod">doActivate</a>'s calls to <a href="../symbols/ResizingTool.html#computeMinSize" class="linkMethod">computeMinSize</a>, <a href="../symbols/ResizingTool.html#computeMaxSize" class="linkMethod">computeMaxSize</a>, and <a href="../symbols/ResizingTool.html#computeCellSize" class="linkMethod">computeCellSize</a>.</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr id="doMouseUp">
|
|
<td class="name">
|
|
|
|
<div class="name">
|
|
doMouseUp()
|
|
</div>
|
|
<div class="attributes">
|
|
|
|
|
|
</div>
|
|
</td>
|
|
<td class="description">
|
|
<div class="description">
|
|
<!--newp--><p><p>Call <a href="../symbols/ResizingTool.html#resize" class="linkMethod">resize</a> with the final bounds based on the most recent mouse point,
|
|
commit the transaction, and raise the "PartResized" <a href="../symbols/DiagramEvent.html" class="linkConstructor">DiagramEvent</a>.<span class="nodetails" id="xmethdoMouseUp"><a class="morelink" onclick="hst('methdoMouseUp')">More...</a></span> <span class="details" id="methdoMouseUp">
|
|
This determines the new bounds by calling <a href="../symbols/ResizingTool.html#computeResize" class="linkMethod">computeResize</a>.
|
|
</span><div class="details" id="dmethdoMouseUp"><p>
|
|
When this calls <a href="../symbols/ResizingTool.html#computeResize" class="linkMethod">computeResize</a> it passes as the reshape argument the result of calling <a href="../symbols/ResizingTool.html#computeReshape" class="linkMethod">computeReshape</a>.</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr id="resize">
|
|
<td class="name">
|
|
|
|
<div class="name">
|
|
resize(newr)
|
|
</div>
|
|
<div class="attributes">
|
|
|
|
|
|
</div>
|
|
</td>
|
|
<td class="description">
|
|
<div class="description">
|
|
<!--newp--><p><p>Change the size of the selected part's <a href="../symbols/Part.html#resizeObject" class="linkProperty">Part.resizeObject</a> to have the given bounds.<span class="nodetails" id="xmethresize"><a class="morelink" onclick="hst('methresize')">More...</a></span> <span class="details" id="methresize">
|
|
This modifies its <a href="../symbols/GraphObject.html#desiredSize" class="linkProperty">GraphObject.desiredSize</a> and maybe its <a href="../symbols/Part.html#location" class="linkProperty">Part.location</a>.
|
|
</span><div class="details" id="dmethresize"><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.</div>
|
|
|
|
|
|
<dl class="detailList">
|
|
<dt class="heading">Parameters:</dt>
|
|
|
|
<dt>
|
|
<span class="light fixedFont">{<a href="../symbols/Rect.html" class="linkConstructor">Rect</a>}</span> <b>newr</b>
|
|
|
|
</dt>
|
|
<dd>a Rectangle in the <a href="../symbols/ResizingTool.html#adornedObject" class="linkProperty">adornedObject</a>'s local coordinates, not in document coordinates</dd>
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr id="updateAdornments">
|
|
<td class="name">
|
|
|
|
<div class="name">
|
|
updateAdornments(part)
|
|
</div>
|
|
<div class="attributes">
|
|
|
|
|
|
</div>
|
|
</td>
|
|
<td class="description">
|
|
<div class="description">
|
|
<!--newp--><p><p>Show an <a href="../symbols/Adornment.html" class="linkConstructor">Adornment</a> with the resize handles at points along the edge of the bounds of the
|
|
selected <a href="../symbols/Part.html" class="linkConstructor">Part</a>'s <a href="../symbols/Part.html#resizeObject" class="linkProperty">Part.resizeObject</a>.<span class="nodetails" id="xmethupdateAdornments"><a class="morelink" onclick="hst('methupdateAdornments')">More...</a></span> <span class="details" id="methupdateAdornments">
|
|
</span><div class="details" id="dmethupdateAdornments"><p>
|
|
First this finds the object in the visual tree of the Part that should
|
|
get the resize adornment and that the user will be able to resize interactively.
|
|
It finds the object that has the <a href="../symbols/Part.html#resizeObjectName" class="linkProperty">Part.resizeObjectName</a> property of the Part.
|
|
If the <a href="../symbols/Part.html#resizeObjectName" class="linkProperty">Part.resizeObjectName</a> property is an empty string, as it is by default,
|
|
it uses the whole part.
|
|
<p>
|
|
It then builds the adornment, associating it with the chosen resize object.
|
|
If <a href="../symbols/Part.html#resizeAdornmentTemplate" class="linkProperty">Part.resizeAdornmentTemplate</a> is non-null, it is copied.
|
|
Otherwise it constructs a new Adornment with a <a href="../symbols/Placeholder.html" class="linkConstructor">Placeholder</a> and eight copies of <a href="../symbols/ResizingTool.html#handleArchetype" class="linkProperty">handleArchetype</a>,
|
|
four at the corners and four at the middle of each side.
|
|
<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.</div>
|
|
|
|
|
|
<dl class="detailList">
|
|
<dt class="heading">Parameters:</dt>
|
|
|
|
<dt>
|
|
<span class="light fixedFont">{<a href="../symbols/Part.html" class="linkConstructor">Part</a>}</span> <b>part</b>
|
|
|
|
</dt>
|
|
<dd></dd>
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
|
|
</tbody>
|
|
</table>
|
|
</div><!-- class="table-responsive">-->
|
|
|
|
|
|
|
|
<dl class="inheritsList">
|
|
<dt>Methods borrowed from class <a href="../symbols/Tool.html" class="linkConstructor">Tool</a>: </dt><dd><a href="../symbols/Tool.html#cancelWaitAfter" class="linkMethod">cancelWaitAfter</a>, <a href="../symbols/Tool.html#canStartMultiTouch" class="linkMethod">canStartMultiTouch</a>, <a href="../symbols/Tool.html#doKeyDown" class="linkMethod">doKeyDown</a>, <a href="../symbols/Tool.html#doKeyUp" class="linkMethod">doKeyUp</a>, <a href="../symbols/Tool.html#doMouseDown" class="linkMethod">doMouseDown</a>, <a href="../symbols/Tool.html#doMouseWheel" class="linkMethod">doMouseWheel</a>, <a href="../symbols/Tool.html#doStart" class="linkMethod">doStart</a>, <a href="../symbols/Tool.html#doStop" class="linkMethod">doStop</a>, <a href="../symbols/Tool.html#doWaitAfter" class="linkMethod">doWaitAfter</a>, <a href="../symbols/Tool.html#findToolHandleAt" class="linkMethod">findToolHandleAt</a>, <a href="../symbols/Tool.html#isBeyondDragSize" class="linkMethod">isBeyondDragSize</a>, <a href="../symbols/Tool.html#standardMouseClick" class="linkMethod">standardMouseClick</a>, <a href="../symbols/Tool.html#standardMouseOver" class="linkMethod">standardMouseOver</a>, <a href="../symbols/Tool.html#standardMouseSelect" class="linkMethod">standardMouseSelect</a>, <a href="../symbols/Tool.html#standardMouseWheel" class="linkMethod">standardMouseWheel</a>, <a href="../symbols/Tool.html#standardPinchZoomMove" class="linkMethod">standardPinchZoomMove</a>, <a href="../symbols/Tool.html#standardPinchZoomStart" class="linkMethod">standardPinchZoomStart</a>, <a href="../symbols/Tool.html#standardWaitAfter" class="linkMethod">standardWaitAfter</a>, <a href="../symbols/Tool.html#startTransaction" class="linkMethod">startTransaction</a>, <a href="../symbols/Tool.html#stopTool" class="linkMethod">stopTool</a>, <a href="../symbols/Tool.html#stopTransaction" class="linkMethod">stopTransaction</a></dd>
|
|
</dl>
|
|
|
|
|
|
<!-- ============================== events summary ======================== -->
|
|
|
|
|
|
<!-- ============================== fields summary ===================== -->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ============================== constructor details ==================== -->
|
|
|
|
</div> <!-- end contentBody -->
|
|
</div> <!-- end container-fluid -->
|
|
|
|
<!-- ============================== footer ================================= -->
|
|
<div id="footer" class="fineprint" style="clear:both">
|
|
Copyright © 1998-2017 by <a href="https://www.nwoods.com/">Northwoods Software Corporation.</a>
|
|
</div>
|
|
</body>
|
|
</html>
|