1 В избранное 0 Ответвления 0

OSCHINA-MIRROR/xieshaoping-GoJS

Клонировать/Скачать
changelog.html 82 КБ
Копировать Редактировать Web IDE Исходные данные Просмотреть построчно История
WalterNorthwoods Отправлено 26.10.2020 19:42 091ae74
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="GoJS changelog." />
<meta http-equiv="cache-control" content="no-cache">
<title>GoJS Change Log</title>
<!-- Copyright 1998-2020 by Northwoods Software Corporation. -->
<script>
(function (i, s, o, g, r, a, m) {
i['GoogleAnalyticsObject'] = r; i[r] = i[r] || function () {
(i[r].q = i[r].q || []).push(arguments)
}, i[r].l = 1 * new Date(); a = s.createElement(o),
m = s.getElementsByTagName(o)[0]; a.async = 1; a.src = g; m.parentNode.insertBefore(a, m)
})(window, document, 'script', 'https://www.google-analytics.com/analytics.js', 'ga');
ga('create', 'UA-1506307-5', 'auto');
ga('send', 'pageview');
</script>
<link rel="stylesheet" href="assets/css/bootstrap.min.css">
<!-- custom CSS after bootstrap -->
<link href="assets/css/main.css" rel="stylesheet" type="text/css" />
<script src="release/go.js"></script>
<script src="assets/js/goDoc.js"></script>
</head>
<body onload="goDoc()">
<!-- fixed navbar -->
<nav id="fixed-nav" class="navbar navbar-inverse navbar-fixed-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="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 mt70 plr15">
<h2>GoJS Change Log</h2>
<p id="ver"></p>
<script>
if (go && go.version) {
var p = document.getElementById('ver');
if (p !== null) p.textContent = ("Version: " + go.version);
}
</script>
<p>
We maintain a <a href="https://github.com/NorthwoodsSoftware/GoJS">GitHub Repository</a>,
which you can star to follow version updates.
We also notify of changes on <a href="https://twitter.com/NorthwoodsGo">Twitter</a>.
</p>
<hr>
<h2 id="2.1">GoJS 2.1</h2>
<h3>New Animation Capabilities</h3>
<p>GoJS 2.1 contains a number of new features to animate different components of your Diagram.</p>
<div style="margin-top: 30px; margin-bottom: 30px;">
<img src="assets/images/changelog/2.1nodeAnimation.gif" style="width: 150px;">
<img src="assets/images/changelog/2.1linkAnimation.gif" style="margin-left: 100px; width: 200px;">
</div>
<p>
See the <a href="intro/animation.html" target="_blank">Intro page on Animation</a>
and the <a href="samples/customAnimations.html" target="_blank">Custom Animation sample</a> for more details and examples.
</p>
<ul>
<li>
New default GoJS animation "fades up", instead of animating Node locations. Added <a>AnimationManager.initialAnimationStyle</a>
to control this behavior.
Here is an example of:
<ul>
<li>
(top) The new initial animation, the Diagram position animating upwards and Diagram opacity animating
from 0 to 1.
<li>
(middle) A custom "zoom in" animation, animating Diagram scale, which is demonstrated in
the new <a href="samples/stateChart.html" target="_blank">State Chart</a> sample,
<li>
(bottom) <a>AnimationManager.initialAnimationStyle</a> set to <a>AnimationManager.AnimateLocations</a> to
perform the GoJS 2.0 and previous style of animation.
The <a href="samples/dataVisualization.html" target="_blank">Data Visualization</a> sample uses this
option.
</ul>
<p>
<img src="assets/images/changelog/2.1initalAnimation.gif" style="margin-left: 10px; width: 250px;">
</p>
</li>
<li>
Added <code>"InitialAnimationStarting"</code> <a>DiagramEvent</a> to more easily customize initial animations.
See <a>AnimationManager.initialAnimationStyle</a> for details.
</li>
<li>
New class: <a>AnimationTrigger</a>. These describe how to automatically animate a property on a GraphObject
when it changes value.
</li>
<li>
New class: <a>Animation</a>. This class lets you declaratively setup custom animations, with options for
indefinite animations.
</li>
<li>
New <a>AnimationManager</a> options, including the ability to define custom animation effects to animate with
<a>AnimationManager,defineAnimationEffect</a>
</li>
<li>
New Animation samples and samples modified to use new Animation features:
<ul>
<li>
<a href="samples/customAnimations.html" target="_blank">Custom Animation</a> - <strong>New Sample:</strong>
Demonstrating a number of Node creation/deletion animations, linking animations, and more.
</li>
<li>
<a href="samples/treeLoadAnimation.html" target="_blank">Tree Load Animation</a> - <strong>New Sample:</strong>
recursive animation upon model load.
</li>
<li>
<a href="samples/flowchart.html" target="_blank">Flowchart</a> - In the Palette only, initial animation
is disabled in favor of a custom fade-in animation.
</li>
<li>
<a href="samples/stateChart.html" target="_blank">State Chart</a> - Initial animation is disabled in
favor of a custom zoom fade-in animation.
</li>
<li>
<a href="samples/dataVisualization.html" target="_blank">Data Visualization</a> - Nodes now move using an
<a>AnimationTrigger</a>.
</li>
<li><a href="samples/kittenMonitor.html" target="_blank">Kitten Monitor</a> - Kittens now move using an <a>AnimationTrigger</a>.</li>
<li>
<a href="samples/processFlow.html" target="_blank">Process Flow</a> - An indefinite Animation of the
Links' strokeDashArray.
</li>
<li>
<a href="samples/shopFloorMonitor.html" target="_blank">Shop Floor Monitor</a> - Link color changes now
use an <a>AnimationTrigger</a>.
</li>
</ul>
</li>
</ul>
<h3>Improved Support For Data Synchronization</h3>
<p>
GoJS 2.1 contains some new methods to ease integration of GoJS diagrams in applications that maintain their own
data, particularly React apps.
</p>
<p>
See the <a href="intro/react.html" target="_blank">Intro page on using GoJS with React</a> and
the <a href="https://github.com/NorthwoodsSoftware/gojs-react-basic" target="_blank">gojs-react example project</a> for details and examples.
Also see <a href="https://github.com/NorthwoodsSoftware/gojs-react" target="_blank">gojs-react</a>, a package
containing React Components for GoJS Diagrams, Palettes, and Overviews.
</p>
<ul>
<li>
New method: <a>Model.toIncrementalData</a>. This method outputs an <a>IncrementalData</a> object containing
changes that occurred within a <a>Transaction</a>,
similar to the existing method, <a>Model.toIncrementalJson</a>. It can be used to keep outside data
synchronized with the GoJS model.
</li>
<li>
New methods: <a>Model.mergeNodeDataArray</a> and <a>GraphLinksModel.mergeLinkDataArray</a>. These methods are
used to merge outside data changes into the GoJS model.
</li>
<li>
New method: <a>Model.cloneDeep</a>. This method can be used to make a deep copy of an object, which may be
useful to ensure GoJS doesn't share references with outside state.
It is also used within <a>Model.toIncrementalData</a> to ensure <a>IncrementalData</a>'s list of modified
objects won't contain references to the model's data objects, if the external data is required to be immutable.
</li>
</ul>
<hr />
<h4 id="2.1.28">Changes for 2.1.28</h4>
<ul>
<li>
Added the <a>Diagram.ensureBounds</a> method.
Like <a>Part.ensureBounds</a>, this is useful when you need the document bounds computed immediately.
It is rare that you will need to call either method, because the normal updating process will
perform the computations for you as part of a transaction, asynchronously.
</li>
<li>
Fixed some parsing issues when using <a>Geometry.parse</a> or <a>Shape.geometryString</a> with SVG arcs.
</li>
<li>
Fixed the <a>Picture.source</a> setter from failing in non-DOM environments.
</li>
<li>
Fix for DOM-less environments that do not have <code>setImmediate</code> defined.
</li>
<li>
Fix for Link routing when connecting to the edge of an arc segment.
</li>
</ul>
<h4 id="2.1.27">Changes for 2.1.27</h4>
<ul>
<li>
Fixed the routing of links connected with nodes that are members of expanded groups inside collapsed groups.
</li>
<li>
Fixed some Shapes in Link Selection Adornments inheriting their <code>strokeWidth</code> from the Link.
Only the main path Shapes of Link "Selection" Adornments with a <code>strokeWidth</code> of 0 will inherit
the <code>strokeWidth</code> from the adorned <a>Link.path</a> Shape.
</li>
<li>
Fixed changing <a>Picture.source</a> back to an empty string not to throw an unnecessary error.
</li>
</ul>
<h4 id="2.1.26">Changes for 2.1.26</h4>
<ul>
<li>
Added a <code>ResizeObserver</code> to automatically detect changes in the size of the
HTMLDivElement (the <a>Diagram.div</a>) in recent browsers.
You will still need to call <a>Diagram.requestUpdate</a> when running in older browsers or in Internet Explorer.
</li>
<li>
Added the <a>ResizingTool.dragsMembers</a> property, for controlling whether resizing a
<a>Group</a> may move its <a>Group.memberParts</a> if it has no <a>Placeholder</a>.
</li>
<li>
Fixed regression since 2.1.24 causing some diagrams not to be drawn even after calling <a>Diagram.requestUpdate</a>.
</li>
<li>
Fixed some cases of finding the nearest intersection point of Bezier curves with a straight finite line.
</li>
</ul>
<h4 id="2.1.25">Changes for 2.1.25</h4>
<ul>
<li>
Added the <a href="samples/connectionBoxNode.html">Connection Box Node</a> sample,
showing nodes that allow links between ports within a node.
</li>
<li>
In order to avoid possible errors caused by loading the GoJS library more than once,
an Error is thrown when a second load is detected, even if the version number is the same.
This helps avoid problems where there are multiple definitions for each of the classes, causing errors such as:
<code>Error: Unknown type of binding target: Node#241</code>, where the object is a GoJS <a>Node</a>,
but not the same GoJS Node class as the code expects.
It also helps avoid situations when both the release library and the debug library are loaded.
</li>
<li>
Fixed raising an extraneous <a>Diagram.mouseOver</a> event during initialization.
</li>
<li>
Fixed a regression since 2.1.0 that would prevent a Diagram or Overview from re-scaling or aligning when its DIV changed size.
</li>
<li>
Fixed invalidating routes of external links when nested groups change their visibility in ways
other than expanding trees or subgraphs.
</li>
<li>
Fixed <a>Model.mergeNodeDataArray</a>, <a>GraphLinksModel.mergeLinkDataArray</a>, and <a>Model.applyIncrementalJson</a>
to set known properties, eg. <a>GraphLinksModel.nodeGroupKeyProperty</a>, even when the property is not present on the new data.
</li>
</ul>
<h4 id="2.1.24">Changes for 2.1.24</h4>
<ul>
<li>
Added the <a href="samples/multiColorLinks.html">Multi-color Links</a> sample,
showing links whose paths can be stroked with multiple colors specified in an Array
as the value of the link's <code>data.colors</code>.
</li>
<li>
Associating a <a>Diagram</a> instance with an HTMLDivElement now causes that Div element to get two new properties:
"goDiagram" to refer to that Diagram instance, and "go" to refer to the "go" namespace if it exists.
This makes it easier to examine or set Diagram properties or to call Diagram methods or methods on GraphObjects
in existing apps without access to the app's source code.
</li>
<li>
Fixed using subclasses of <a>GraphLinksModel</a> or <a>TreeModel</a>.
</li>
<li>
Fixed <a>AnimationTrigger</a>s incorrectly starting when <a>AnimationManager.isEnabled</a> is set to <code>false</code>.
</li>
<li>
Fixed extraneous Transaction <a>ChangedEvent</a>s when modifying a group invalidated a layout.
</li>
</ul>
<h4 id="2.1.23">Changes for 2.1.23</h4>
<ul>
<li>
Added the <a href="extensions/ArrangingLayout.js" target="_blank">Arranging Layout</a> extension,
demonstrated in the <a href="extensions/Arranging.html" target="_blank">Arranging</a> sample.
This layout is basically a layout of layouts, so that you can have a <a>CircularLayout</a> of <a>CircularLayout</a>s,
as shown in the sample, or a <a>PackedLayout</a> of <a>TableLayout</a>s, or whatever.
The <a>ArrangingLayout</a> also has a third layout that is used to position nodes not arranged by the main layout.
This is normally a <a>GridLayout</a> that only positions singleton (disconnected) nodes.
</li>
<li>
Improved the <a>ParallelLayout</a> extension and rewrote the
<a href="samples/flowgrammer.html" target="_blank">Flowgrammer</a> sample to use that <b>ParallelLayout</b>.
</li>
<li>
Fixed <a>UndoManager</a> sometimes adding a duplicate "Layout" transaction to the <a>UndoManager.history</a>.
</li>
</ul>
<h4 id="2.1.22">Changes for 2.1.22</h4>
<ul>
<li>
Added the <a href="extensions/RescalingTool.js" target="_blank">Rescaling Tool</a> extension,
demonstrated in the <a href="extensions/Rescaling.html" target="_blank">Rescaling</a> sample.
This tool modifies the <a>GraphObject.scale</a> property,
unlike the <a>ResizingTool</a> which modifies the <a>GraphObject.desiredSize</a> property.
</li>
<li>
Improved performance of <a>Model.mergeNodeDataArray</a>, <a>GraphLinksModel.mergeLinkDataArray</a>, and <a>Model.toIncrementalData</a>.
The merge methods require that references are not shared between the the GoJS model and the external data provided and will now make deep copies
of any new data objects before adding them to the model. This means <a>Model.cloneDeep</a> doesn't need to be called on the arrays passed in,
as the merge methods will make the necessary calls.
</li>
<li>
Fixed `go-module.js` to work when treated as an ES6 module in Node.js.
At the same time we have added `go.mjs` and `go-debug.mjs` as copies of `go-module.js` and `go-debug-module.js`.
For compatibility the kit will contain both sets of files.
</li>
<li>
Fixed automatically performing layouts of outer groups after inner nested groups changed size.
</li>
</ul>
<h4 id="2.1.21">Changes for 2.1.21</h4>
<ul>
<li>
Added the <a href="extensions/SwimLaneLayout.js" target="_blank">Swim Lane Layout</a> extension,
demonstrated in the <a href="extensions/SwimLaneLayout.html" target="_blank">Swim Lane Layout</a> sample.
This layout is a version of <a>LayeredDigraphLayout</a> that positions each node in the lane in which it is supposed to be.
</li>
<li>
Fixed parts that have their location or position set when not in the Diagram.
This issue affected temporary parts, such as Adornments created by Tools that were repeatedly added and removed from the Diagram.
</li>
<li>
Fixed ordering of links on a <a>Spot,TopSide</a> or <a>Spot,BottomSide</a> port when linking with a node to the right.
</li>
<li>
Fixed some scaling animations when <a>Diagram.autoScale</a> is set.
</li>
</ul>
<h4 id="2.1.20">Changes for 2.1.20</h4>
<ul>
<li>
Fixed <a>GraphLinksModel.setLabelKeysForLinkData</a> sometimes disassociating a link's label nodes that existed in both the old and new array.
</li>
<li>
Fixed the recording of model changes bound to a Part's <code>position</code> or <code>location</code>, where they may not have been recorded
in the UndoManager when modifying the <code>position</code>, <code>location</code>, or <code>desiredSize</code>.
This also fixes a regression from 2.1.14.
</li>
<li>
Fixed <a>LinearGradient</a> painting when used as a <a>Shape.stroke</a>.
This drawing issue was most apparent when the Shape's geometry was one-dimensional.
</li>
<li>
Fixed warning messages in Chrome about passive touch event listeners.
</li>
<li>
Fixed JumpOver and AvoidsNodes issues where ongoing animations might stop them from updating.
</li>
</ul>
<h4 id="2.1.19">Changes for 2.1.19</h4>
<ul>
<li>
Fixed changing <a>Placeholder.padding</a> to remeasure its <a>Group</a> or <a>Adornment</a>.
</li>
<li>
Fixed <a>Diagram.initialPosition</a> and <a>Diagram.initialScale</a> sometimes not showing scrollbars on initialization.
</li>
<li>
Fixed not recording a transaction that was empty until a "CommittingTransaction" Transaction-type <a>ChangedEvent</a>
caused some <a>ChangedEvent</a>s to made, a regression from 2.1.16.
</li>
</ul>
<h4 id="2.1.18">Changes for 2.1.18</h4>
<ul>
<li>
Added the <a href="samples/belts.html">Belts and Rollers</a> sample,
showing belts or chains wending around rollers or gears.
</li>
<li>
Fixed finding a node by key after undoing a call to <a>Model.setKeyForNodeData</a>.
</li>
<li>
Fixed Diagram initialization without DIVs or with delayed initialization,
where setting some properties like <a>Diagram.scaleComputation</a> would cause measuring errors.
</li>
<li>
Improved handling of numeric large arc flag values when creating SVG arc <a>PathSegment</a>s via <a>PathSegment.constructor</a>.
</li>
<li>
Fixed the TypeScript declaration for <a>GraphObject,make</a> to handle <a>AnimationTrigger</a>s.
</li>
</ul>
<h4 id="2.1.17">Changes for 2.1.17</h4>
<ul>
<li>
Added the <a href="samples/radialAdornment.html">Radial Adornment Buttons</a> sample,
showing a selection <a>Adornment</a>, only on one node, that is like a context menu
with buttons arranged in a circle around the selected node.
</li>
<li>
Added the <a href="samples/donutCharts.html">Donut Charts</a> sample,
showing a simple circular bar chart in each node.
</li>
<li>
Fixed exporting the <a>Picture.reloadSource</a> and <a>Picture.redraw</a> methods.
</li>
<li>
Fixed the <a>LinkingBaseTool.temporaryFromPort</a> and <a>LinkingBaseTool.temporaryToPort</a> property setters
to replace the port of the corresponding temporary node. This allows customization of a <a>LinkingTool</a>
by setting either or both of those two properties.
</li>
<li>
Fixed <a>Diagram.makeImage</a> with a Picture SVG data URI source, in the same manner as in 2.1.16.
</li>
<li>
Fixed undo of a <a>Shape.geometry</a> setting, after its <a>GraphObject.desiredSize</a> had been set.
This particular sequence of events was discovered in the use of the <a>GeometryReshapingTool</a> extension.
</li>
</ul>
<h4 id="2.1.16">Changes for 2.1.16</h4>
<ul>
<li>
Added the <a href="samples/animatedFocus.html">Animated Focus</a> sample,
which demonstrates how to scroll to a node and really make it obvious where the node is
and what it looks like.
</li>
<li>
Added the <a href="samples/addToPalette.html">Add To Palette</a> sample,
which allows the user to add items from the palette by selecting a node,
customizing it, and then executing a command to copy it to the palette's model.
The user can also remove selected items from the palette via a command,
even though <a>Palette.isReadOnly</a> is true.
</li>
<li>
Fixed <a>Diagram.makeImage</a> when a Picture has an SVG source that has a different size than its viewbox.
In some browsers the SVGs had been drawn with the incorrect aspect ratio.
</li>
<li>
Fixed <a>Diagram.delayInitialization</a> incorrectly resetting the <a>Diagram.position</a> when animation is enabled.
</li>
</ul>
<h4 id="2.1.15">Changes for 2.1.15</h4>
<ul>
<li>
Added the <a href="samples/singlePage.html">Single Page Diagram</a> sample,
demonstrating how to show a sheet of paper behind the diagram and how to limit
dragging and resizing to stay within the margins of the page.
</li>
<li>
Fixed label TextBlocks in <a href="intro/graduatedPanels.html">Graduated Panels</a> not respecting their assigned <a>GraphObject.angle</a>.
The angle will now be used when the label's <a>GraphObject.segmentOrientation</a> is <a>Link.None</a>, <a>Link.OrientAlong</a>,
or <a>Link.OrientUpright</a>.
</li>
<li>
Fixed expand and collapse animations, where collapsed objects would temporarily receive NaN locations.
</li>
</ul>
<h4 id="2.1.14">Changes for 2.1.14</h4>
<ul>
<li>
Added the <a href="samples/blockEditor.html">Simple Block Editor</a> sample,
demonstrating how to let users easily build block diagrams.
</li>
<li>
Changing <a>Link.fromShortLength</a> or <a>Link.toShortLength</a> no longer invalidates the link's route.
</li>
<li>
Improved the corner curves of orthogonal links when needing to make consecutive turns within double the corner radius.
</li>
<li>
Fixed an incorrect optimization introduced in 2.1.13 updating initial scrollbars when animating.
</li>
<li>
Fixed undo and redo of <a>ResizingTool</a> operations when the <a>Part.locationSpot</a> is not TopLeft.
</li>
</ul>
<h4 id="2.1.13">Changes for 2.1.13</h4>
<ul>
<li>
Fixed the cursor shown during a drag in an <a>Overview</a> if some external HTML element changed the cursor.
</li>
<li>
Fixed <a>Diagram.makeSvg</a> when rendering a fill or a stroke that is translucent not to make the opacity too small.
</li>
<li>
Added wait spinners to three of the "Virtualized" samples:
<a href="samples/virtualized.html" target="_blank">Virtualized</a>,
<a href="samples/virtualizedForceLayout.html" target="_blank">VirtualizedForceDirectedLayout</a>,
<a href="samples/virtualizedTreeLayout.html" target="_blank">VirtualizedTreeLayout</a>.
These use an image rotated using CSS animation that is positioned in front of the Diagram.
</li>
</ul>
<h4 id="2.1.12">Changes for 2.1.12</h4>
<ul>
<li>
Added the <a href="samples/controlGauges.html">Meter and Gauge Controls</a> sample,
demonstrating several different kinds of meter and gauge instruments whose values
can also be modified by the user by dragging their indicators.
</li>
<li>
Added the <a href="samples/productionEditor.html">Production process editor</a> sample,
which edits diagrams that can be shown by the
<a href="samples/productionProcess.html">Production process</a> sample.
</li>
<li>
Added the <a>SnapLinkReshapingTool.avoidsNodes</a> property in the extensions directories.
</li>
</ul>
<h4 id="2.1.11">Changes for 2.1.11</h4>
<ul>
<li>
Fixed "Grid" Panels to ignore the order of shapes in the panel when considering whether a larger <a>Shape.interval</a>
shape should suppress a smaller interval shape, or should be suppressed by a larger interval shape.
Changed "Grid" Panels to allow multiple shapes with the same <a>Shape.interval</a> to be drawn in the same orientation
(horizontal or vertical).
</li>
<li>
Fixed documentation by undocumenting the useless <a>AnimationManager.animationReasons</a> property that was accidentally documented.
See the updated documentation for <a>AnimationManager.canStart</a>.
</li>
<li>
Fixed <a>Brush.isDark</a> sometimes using an incorrect ordering of <a>Brush.colorStops</a>
when determining darkness near the middle of a Brush.
</li>
</ul>
<h4 id="2.1.10">Changes for 2.1.10</h4>
<ul>
<li>
Added <a>DrawCommandHandler.pullToFront</a> and <a>DrawCommandHandler.pushToBack</a> commands in the extensions directories.
</li>
</ul>
<h4 id="2.1.9">Changes for 2.1.9</h4>
<ul>
<li>
Fixed breadth computations for some cases of <a>TreeLayout.arrangement</a> of separate trees
when <a>TreeLayout.compaction</a> is <code>go.TreeLayout.CompactionNone</code>.
</li>
<li>
Fixed type declarations of <a>Binding.converter</a> and <a>Binding.backConverter</a>
to return <code>any</code> instead of <code>void</code>.
</li>
</ul>
<h4 id="2.1.8">Changes for 2.1.8</h4>
<ul>
<li>
Added the <a href="samples/gameOfLife.html">Game of Life cellular automation</a> sample.
</li>
<li>
You can improve the performance of an <a>Overview</a> that is observing a large diagram with a visible <a>Diagram.grid</a>
by setting <a>Overview.drawsTemporaryLayers</a> to false.
</li>
<li>
Improved the behavior from 2.1.7 when trying to open text editors in multiple diagrams.
A new text editor can be started only if the previous one was able to be accepted.
If <a>TextBlock.textValidation</a> or <a>TextEditingTool.textValidation</a> fails,
focus remains in that older editor and a new one cannot be started.
</li>
<li>
Fixed exception during copy-dragging when some parts are not <a>Part.copyable</a>.
</li>
</ul>
<h4 id="2.1.7">Changes for 2.1.7</h4>
<ul>
<li>
Added the <a href="extensions/PackedHierarchy.html">Packed Hierarchy</a> sample,
which demonstrates a custom <a>PackedLayout</a> for nested circular groups.
</li>
<li>
Added an optional argument to <a>Diagram.clearSelection</a>, and allowed that method to be overridden.
</li>
<li>
The <a>TextEditingTool</a> now only allows one active text editor globally, instead of one per Diagram.
This avoids some focus problems in various browsers.
</li>
</ul>
<h4 id="2.1.6">Changes for 2.1.6</h4>
<ul>
<li>
The <code>release/go-module.js</code> file now exports every class, so that you can import only specific classes, instead of <code>go</code>.
For example: <code>import { Diagram, Node, Link, Point, Shape, TextBlock } from ...</code>.
</li>
<li>
Added a sample demonstrating generating a PDF file for a Diagram, in the <code>projects/pdf</code> subdirectory.
The sample is at <a href="projects/pdf/minimalPDF.html" target="_blank">minimalPDF</a>.
</li>
<li>
Fixed <a>AnimationTrigger</a>s erroneously starting when dragging and dropping Parts from another Diagram or Palette.
</li>
<li>
Fixed <a>LinkingTool</a> not deselecting other parts when a new link is created.
</li>
</ul>
<h4 id="2.1.5">Changes for 2.1.5</h4>
<ul>
<li>
Added <a href="extensionsTS/VirtualizedPacked.html">VirtualizedPacked</a> sample,
which demonstrates a custom layout for large graphs of nested groups,
defined in <a href="extensionsTS/VirtualizedPackedLayout.ts">VirtualizedPackedLayout.ts</a>.
(Source is TS only)
</li>
<li>
Fixed setting a node key reference in either a node or link via <a>GraphLinksModel.setGroupKeyForNodeData</a>,
<a>GraphLinksModel.setFromKeyForLinkData</a>, or <a>GraphLinksModel.setToKeyForLinkData</a> where it could fail to resolve
if the node did not yet exist. This issue did not exist during typical model loading.
</li>
<li>
Fixed a regression since 2.1.1 with <a>Diagram.clear</a> failing to clear internal Parts lists (like <a>Diagram.nodes</a>).
</li>
</ul>
<h4 id="2.1.4">Changes for 2.1.4</h4>
<ul>
<li>
Added <a>Link.computeAdjusting</a> to conditionally change the value of <a>Link.adjusting</a> used. As a new default,
links will use the adjusting value <a>Link,End</a> during animation. <a>Link.computeAdjusting</a> can be overridden to change this behavior.
</li>
<li>
Added <a>Geometry.getPointAlongPath</a>, <a>Geometry.getAngleAlongPath</a>, and <a>Geometry.getFractionForPoint</a>.
These methods can be used to find a point or angle for a given fractional distance along a Geometry's path,
or to find the fractional distance along the Geometry's path given a nearby point.
</li>
<li>
Setting <a>GraphObject.segmentIndex</a> to NaN, which was previously an error,
will now treat the entire link path as the segment for the purpose of <a>GraphObject.segmentFraction</a>.
This allows for using fractional distances along the entire link rather than just one segment.
</li>
<li>
Fixed object picking during Diagram's InitialLayoutCompleted DiagramEvent.
</li>
<li>
Fixed GoCloudStorage where a null defaultModel would fail.
</li>
<li>
Fixed <a>Panel.graduatedValueForPoint</a> in cases where the main shape was a diagonal line
and the provided point didn't fall on the line.
</li>
</ul>
<h4 id="2.1.3">Changes for 2.1.3</h4>
<ul>
<li>
Fixed a regression from 2.0.0 with AvoidsNodes links improperly re-routing when using the DraggingTool.
</li>
<li>
Fixed a undo (redo) bug with <a>AnimationTrigger</a>s that used location or position on Parts.
</li>
<li>
Improved routing of duplicate links that have <a>Link.adjusting</a> set to a value other than None and have
more than the standard number of points in their route.
</li>
</ul>
<h4 id="2.1.2">Changes for 2.1.2</h4>
<ul>
<li>
Fixed a regression in 2.1.1 with the timing of <code>InitialAnimationStarting</code> that would prevent custom
initial animations.
</li>
<li>
CTRL + Mouse-wheel will still stop the event from bubbling,
even if <a>CommandHandler.canIncreaseZoom</a> or <a>CommandHandler.canDecreaseZoom</a> return false.
These are potentially false if a <a>Diagram.minScale</a> or <a>Diagram.maxScale</a> are set.
This change stops the entire page from accidentally zooming during a zoom-wheel operation.
</li>
<li>
Fixed a measuring bug with Link Geometry when the Link is smaller than the <a>Link.toShortLength</a> or <a>Link.fromShortLength</a>.
</li>
</ul>
<h4 id="2.1.1">Changes for 2.1.1</h4>
<ul>
<li>
Fixed updating of <a>Adornment</a>s when there are <a>Binding</a>s from <a>Model.modelData</a>
and that shared object has been modified by calling <a>Model.set</a>.
</li>
<li>
Improved performance when replacing <a>Diagram.model</a> when cleaning up the old model,
which had infrequently resulted in obscure warnings in debug mode about <a>Node.isTreeLeaf</a>.
</li>
<li>
Fixes for loading Models with serialized EnumValues.
</li>
<li>
Performance improvements for concurrent animations.
</li>
<li>
Fixes for consistency of animation state.
This includes modifying when <code>AnimationStarting</code> and <code>InitialAnimationStarting</code> are
called,
and fixes when default animations are stopped and another is immediately started, such as when loading a new
model in the middle of animation.
</li>
<li>
Fixed <a>Model.fromJson</a> loading models with serialized EnumValues.
</li>
<li>
Improved showing non-default cursors when dragging between diagrams.
</li>
<li>
Fixed the operation of <a>Diagram.handlesDragDropForTopLevelParts</a> when dragging on the elements of a <a>Group</a>.
</li>
<li>
Fixed <a>Diagram.scrollHorizontalLineChange</a> and <a>Diagram.scrollVerticalLineChange</a> would
not affect scrolling size in some browsers.
</li>
<li>
Fixed AvoidsNodes Links routing in nested groups.
</li>
</ul>
<h4 id="2.1.0">Other Changes for 2.1.0:</h4>
<p>
See the major changes <a href="#2.1">above</a>.
</p>
<ul>
<li>
Added <a>DoubleTreeLayout</a> to the extensions and extensionsTS directories. This is now used by the
<a href="samples/doubleTree.html">Double Tree</a> sample.
</li>
<li>
Updated the sequencing of "ChangingSelection" and "ChangedSelection" <a>DiagramEvent</a>s to be outside of
transactions for commands and tools.
Exceptions include "ChangingSelection" being called during "Drag" and "Linking" operations when drag-copying or
inserting a link.
With "ChangedSelection" occuring after a transaction completes, any changes will be complete and can be used in
the listener.
</li>
<li>
<a>CommandHandler.zoomToFit</a> now animates by default.
</li>
<li>
Improved the <a>ContextMenuTool.defaultTouchContextMenu</a>'s "Paste" command to use the <a>ContextMenuTool.mouseDownPoint</a>
rather than the <a>Diagram.lastInput</a>'s <a>InputEvent.documentPoint</a>.
</li>
<li>
Added new property, <a>Diagram.opacity</a>. This may be useful for fade-in/out animations, or visual indication
of a disabled Diagram.
</li>
<li>
Added new method, <a>Diagram.findLinkForKey</a>, which will look for a link corresponding to a model's link
data object's unique key.
This will only return a link when using a <a>GraphLinksModel</a> with <a>GraphLinksModel.linkKeyProperty</a>
set to a non-empty string.
</li>
<li>
<a>Model.applyIncrementalJson</a> now throws an error if model properties (eg. nodeKeyProperty) included in the
JSON don't match the existing model.
This check only includes properties included in the output from <a>Model.toIncrementalJson</a>.
</li>
<li>
Added new methods, <a>Picture.reloadSource</a>, which reloads a Picture source in case the file on the server has
changed,
and <a>Picture.redraw</a> which redraws the picture, and can be useful to update the Picture if the source is
backed by an HTML Canvas or HTML Video Element.
</li>
<li>
Added new sample: <a href="samples/svgDataUrl.html" target="_blank">SVG Data URL</a> - Export SVG with Base64 hrefs instead
of the <a>Picture.source</a> URL.
</li>
</ul>
<hr />
<h2 id="2.0">GoJS 2.0</h2>
<p>
For 2.0, GoJS has been rewritten in TypeScript, with improvements to stability and documentation.
All customers (with or without source code license) can take advantage of the TypeScript definitions <code>.d.ts</code>
file, which is much more comprehensive in 2.0.
</p>
<p>
A source license will now include TypeScript source files as well as JavaScript sources,
and examples of how to build the library into your project with Webpack or Browserify,
should you wish to. This will allow you to remove unused modules from the source code,
such as Layouts, Models, and Tools that you are not using. Note that unless you have strong minification,
you may not see size improvements over the pre-built <code>go.js</code> library, which is highly optimized.
</p>
<p>
The size of the <code>go.js</code> library has been slightly reduced (both uncompressed and gzipped), from the 1.8 versions.
</p>
<p>
The main library has been reduced by removing many of the uncommon figures.
These are now an extension. (<a href="extensions/Figures.js" target="_blank">Figures.js</a>)
</p>
<p>
GoJS can now be run DOM-less, in Node.
</p>
<p>
We have added the ability to create your own Panels, with the new PanelLayout class.
See an example <a href="samples/panelLayout.html" target="_blank">here</a>.
</p>
<hr />
<h4 id="2.0.18">Changes for 2.0.18</h4>
<ul>
<li>
Shapes with a shadow and a <a>Shape.fill</a> value of <code>"transparent"</code> now apply the shadow to the <a>Shape.stroke</a>,
instead of the invisible <a>Shape.fill</a>.
</li>
<li>
Minor scrollbar fixes.
</li>
<li>
Fixed "PanelExpanderButton" click event handler to set <a>InputEvent.handled</a> to true, so that other click
event handlers in containing panels will not run.
</li>
<li>
Improved the <a>Map</a> constructor and <a>Map.addAll</a> method to accept an instance of <a>Map</a>.
</li>
</ul>
<h4 id="2.0.17">Changes for 2.0.17</h4>
<ul>
<li>
Fixed scrollbars when setting invisible/hidden Diagram DIVs to visible/unhidden while modifying
their size.
</li>
<li>
Improved orthogonal link segment overlap avoidance in <a>LayeredDigraphLayout</a>.
</li>
<li>
Optimizations for Puppeteer.
</li>
</ul>
<h4 id="2.0.16">Changes for 2.0.16</h4>
<ul>
<li>
IE bugfix when dragging from a Diagram or Palette and dropping on a non-Diagram page element.
</li>
<li>
Fixed the <a>DraggingTool</a>, when moving or copying between diagrams, to update the <a>Diagram.currentCursor</a>
to be the <a>Diagram.defaultCursor</a>, not to "default".
</li>
<li>
Fixed a bug when setting <a>AnimationManager.isInitial</a> to <code>false</code> when there are no Parts in the
initial model.
</li>
</ul>
<h4 id="2.0.15">Changes for 2.0.15</h4>
<ul>
<li>
Link JumpOver fixes.
</li>
<li>
Fixed an animation bug where some Model loading events might not respect the value of <a>AnimationManager.isInitial</a>.
</li>
<li>
Fixed <a>AnimationManager.isInitial</a>, where subsequent animations may not occur when it is false.
</li>
<li>
Fixed Picture drawing when the Picture is scaled to be drawn smaller than a pixel.
During expanding animations, it is possible that such a small scale is applied to a Picture.
</li>
</ul>
<h4 id="2.0.14">Changes for 2.0.14</h4>
<ul>
<li>
Added <a>DraggingOptions.groupsAlwaysMove</a>,
which determines whether Groups move their member parts even if those members have.
<a>Part.movable</a> and <a>Part.copyable</a> set to false.
</li>
<li>
Improved the way Graduated panels decide whether or not to draw ticks based on <a>Diagram.scale</a>.
It is now based on the approximate pixel distance between ticks.
If they would be rendered too close together, they will be skipped.
</li>
<li>
Fixed an infinite loop bug with <a>ContextMenuTool</a> when invoked by <a>CommandHandler.showContextMenu</a> on
a <a>GraphObject.click</a> event.
</li>
<li>
Minor fixes for using GoJS within Puppeteer, for making SVG.
</li>
</ul>
<h4 id="2.0.13">Changes for 2.0.13</h4>
<ul>
<li>
When dragging over a different Diagram than the source, such as in a drag from a Palette,
the DraggingTool now checks the Diagram's cursor and only changes it to <code>"copy"</code>
if the <a>Diagram.currentCursor</a> value is <code>""</code> or <code>"auto"</code>.
</li>
<li>
Drawing fix for some objects disappearing when rotated, and the Diagram is scaled.
</li>
<li>
Optimized <a>Group.move</a> not to try moving member parts when the offset is zero.
This improves the stability of layouts that move groups, such as PoolLayout in some samples.
</li>
<li>
<strong style="color:red;">
This bugfix potentially breaks old <code>elementFinished</code> code in Shape
geometries with multiple figures.
</strong>
Fix for <a>Diagram.makeSVG</a> <code>elementFinished</code> optional argument:
Shapes with multiple geometry figures would pass the final SVG <code>&lt;path&gt;</code> generated as the SVG
element,
when they should be grouped together and pass an SVG <code>&lt;g&gt;</code> instead.
This is what TextBlock already does when there is more than one line of text.
</li>
</ul>
<h4 id="2.0.12">Changes for 2.0.12</h4>
<ul>
<li>
Fixed a memory leak with internal <a>Picture</a> caching when modifying Panel item arrays.
</li>
<li>
Fixed animation when expanding and collapsing during Diagram load.
</li>
<li>
Fixed drawing in IE when drawing shapes with zero width or height geometries that have a stroke.
</li>
<li>
The <a>DraggingTool</a> will no longer auto scroll the diagram if <a>Diagram.isReadOnly</a> is true or both <a>Diagram.allowMove</a>
and <a>Diagram.allowCopy</a> are false.
This means that, by default, a <a>Palette</a> will no longer auto scroll while the DraggingTool is active.
</li>
<li>
Improved positioning of unrotated link labels when <a>GraphObject.segmentOffset</a> is <code>go.Point(NaN, NaN)</code>
and the link segment is more vertical than horizontal.
</li>
</ul>
<h4 id="2.0.11">Changes for 2.0.11</h4>
<ul>
<li>
Fixed <a>CommandHandler.standardMouseOver</a> mis-reporting the current object, a regression from 2.0.10.
</li>
</ul>
<h4 id="2.0.10">Changes for 2.0.10</h4>
<ul>
<li>
Fixed simulated <a>InputEvent</a>s, such as used by <a>Robot</a>, that caused <a>GraphObject.mouseEnter</a>
and <a>GraphObject.mouseLeave</a> event handlers not to be called.
</li>
<li>
The <a>Diagram.model</a> setter and <a>Diagram.clear</a> now call <a>Diagram.clearSelection</a> and <a>Diagram.clearHighlighteds</a>.
This provides a more uniform protocol of selection events.
</li>
<li>
Fixed some cases of preventing some <a>Picture.successFunction</a>s from ever firing.
</li>
<li>
Fixed Bezier link routing in <a>LayeredDigraphLayout</a> when <a>LayeredDigraphLayout.setsPortSpots</a>
was false
and an end of the link was undirected.
</li>
<li>
Fixed a performance bug with Picture caching, introduced in 2.0.5.
</li>
</ul>
<h4 id="2.0.9">Changes for 2.0.9</h4>
<ul>
<li>
<a>Diagram.makeSvg</a> now accepts <code>callback</code> and <code>callbackTimeout</code> options. This makes
it more like
<a>Diagram.makeImage</a> and <a>Diagram.makeImageData</a> (which have had these options since 2.0.0).
If a callback function is provided, the methods will instead return null
and SVG creation will wait until all Diagram Picture sources are loaded
before creating the SVG and invoking the callback.
</li>
<li>
Fixed a regression with <a>Diagram.makeSvg</a> where it would not draw Pictures that were not yet loaded, even
if they had a valid size.
</li>
<li>
Fixed <a>GridLayout</a>s when used as a <a>Group.layout</a> and when <a>GridLayout.alignment</a> is <code>go.GridLayout.Position</code>,
to treat <a>GridLayout.wrappingWidth</a> as a width limit, regardless of the <a>Layout.arrangementOrigin</a>.
If you were forced to set <a>GridLayout.wrappingColumn</a> to a value just to be free of the treatment of the
default value for <a>GridLayout.wrappingColumn</a>
(<code>NaN</code>) to indicate the width of the viewport, it is now possible to set <a>GridLayout.wrappingWidth</a>
to respect a smaller value.
</li>
<li>
Fixed maintaining the selection state of selected Parts that change their category.
</li>
<li>
GoJS will step down the Canvas resolution during drawing operations like dragging and panning, which can lead
to "fuzzy" shapes and text during these operations.
This is now only done when a slower frame rate is detected.
</li>
<li>
Drawing performance improvements, especially in well-connected graphs.
</li>
<li>
Fixed trackpad scrolling reversing at the end of scroll events.
</li>
<li>
Fixed drawing grids on some <a>Overview</a>s.
</li>
</ul>
<h4 id="2.0.8">Changes for 2.0.8</h4>
<ul>
<li>
Fixed a regression with Pictures from 2.0.4 that would throw an error when setting <a>Picture.source</a>.
</li>
<li>
Fixed potential errors in <a>Binding.ofObject</a> bindings when changing category/template because the bindings
were being evaluated on the copied new template rather than on the original Part.
</li>
</ul>
<h4 id="2.0.7">Changes for 2.0.7</h4>
<ul>
<li>
Floorplanner 2.0 - New Floorplanner project (<a href="projects/floorplannerTS/floorplannerTSSample.html">
see it
here
</a>), written in TypeScript, at <code>projects/floorplannerTS</code>. New features include:
<ul>
<li>
Wall mitering, with updated dimension links and angle nodes to account for this
</li>
<li>
The ability to define rooms, complete with name, floor type, area, and draggable labels
</li>
<li>
Textures - apply seamless textures to furniture or floors, by use of GoJS Pattern Brushes
</li>
<li>
Full integration with the GoCloudStorage library (save to Local Storage / Google Drive / Dropbox /
OneDrive)
</li>
<li>
Export to PNG
</li>
<li>
Export to SVG
</li>
<li>
Ability to define unit scale in Options menu
</li>
</ul>
</li>
<li>
New intro page on <a href="intro/replacingDeleting.html">Replacing Diagrams and Models</a>
</li>
<li>
Fixed Link Shape Geometries not rendering when updated partially off-screen.
</li>
<li>
Fixed <a>InputEvent.clickCount</a>: Before, on touch devices, this count was incremented only on the
end of the touch, and not the start.
This was discrepant from mouse click behavior, and would lead to problems when Tools queried the clickCount on
touch/mouseDown,
when determining for instance if a particular InputEvent was a double-click. Now, the <a>InputEvent.clickCount</a>
is reported consistently
on mouseDown/touchStart/pointerDown and the corresponding "up" events.
</li>
<li>
GoJS previously would set the Canvas Context's imageSmoothingEnabled property to false.
It no longer does this. If this change causes visual errors, please contact us.
</li>
</ul>
<h4 id="2.0.6">Changes for 2.0.6</h4>
<ul>
<li>Fixed the <code>go.d.ts</code> file where <a>GraphObject.alignment</a> was missing.</li>
<li>
Added missing cloneProtected overrides for <a>BalloonLink</a> and <a>DimensioningLink</a> so data is properly
copied.
</li>
</ul>
<h4 id="2.0.5">Changes for 2.0.5</h4>
<ul>
<li>
Fix for <a>Shape,defineFigureGenerator</a> where it would incorrectly throw an error on Geometry bounds being
too large, when they were not.
</li>
<li>
Some touch events would cause [intervention] warnings in some browsers when canceled because GoJS would call
<code>preventDefault</code> on non-cancelable events.
This has been fixed.
</li>
<li>Fixed <a>Diagram.zoomToFit</a> when <a>Diagram.scrollMode</a> was set to <a>Diagram,InfiniteScroll</a>.</li>
<li>
Fixed <a>GuidedDraggingTool</a> snapping the whole part to a guideline instead of the location object.
</li>
</ul>
<h4 id="2.0.4">Changes for 2.0.4</h4>
<ul>
<li>
Fixed the TypeScript declaration of <a>GraphObject,make</a> to allow an <code>HTMLDivElement</code> as an
argument when building a <a>Diagram</a>.
Also added some type overloads of that function to reduce apparent type errors with correct code.
</li>
<li>
Fixed some apparent non-determinism in the results of <a>LayeredDigraphLayout</a> upon an initial layout.
</li>
<li>
Animation upgrades, notably when you move a port during an animation, connected Links will properly re-route.
</li>
</ul>
<h4 id="2.0.3">Changes for 2.0.3</h4>
<ul>
<li>
Improved data binding of tooltips and context menus for item panels to avoid temporarily setting <a>Panel.data</a>
incorrectly.
</li>
<li>
Enhanced the meaning of <a>UndoManager.maxHistoryLength</a> so that a value of zero causes no <a>Transaction</a>s
to be
remembered in the <a>UndoManager.history</a> but allows commits and rollbacks to occur normally.
</li>
<li>
Fixed a bug introduced in 2.0.1 with <a>Diagram.makeSvg</a> incorrectly re-using SVG elements.
</li>
<li>
Fixed a bug introduced in 2.0.0 with <a>Diagram.makeSvg</a> when drawing dashed paths.
</li>
<li>
Deployment fixes for electron apps.
</li>
</ul>
<h4 id="2.0.2">Changes for 2.0.2</h4>
<ul>
<li>
Updated the <a href="samples/canvases.html">Charts in Nodes sample</a> to use <a href="https://chartjs.org">Chart.js</a>.
</li>
<li>
Deployment fixes. This release should resolve <em>"Cannot use 'in' operator to search for 'go' in undefined"</em>
errors in some browser contexts.
</li>
</ul>
<h4 id="2.0.1">Changes for 2.0.1</h4>
<ul>
<li>
TypeScript declarations: we have created the <a>ObjectData</a> interface, defined as <code>{ [index: string]: any; }</code>,
to allow easier manipulation of data Objects, mostly in Models and change notification.
Many methods and properties now use <code>ObjectData</code> instead of <code>Object</code> in the <code>go.d.ts</code>
file.
The compiled JavaScript is unchanged by these better type declarations.
</li>
<li>
We have added interface declarations for the "options" argument to
<a>Diagram.makeImage</a>, <a>Diagram.makeImageData</a>, and <a>Diagram.makeSvg</a>.
Also we have added more precise declarations replacing the <code>string</code> type for arguments to
<a>Diagram.addDiagramListener</a>, <a>Diagram.removeDiagramListener</a>, <a>Diagram.scroll</a>,
and for the properties
<a>Shape.strokeCap</a>, <a>Shape.strokeJoin</a>, and <a>TextBlock.textAlign</a>.
JavaScript calls to these methods are unchanged by these better type declarations.
</li>
<li>
We have improved the declarations for <a>GraphObject,make</a>.
You may find that you will need to cast the result of calling this function or pass a result type when the
first argument is a string. For example:
<code>$(go.Node, . . ., { contextMenu: $&lt;go.Adornment&gt;("ContextMenu", . . .) }, . . .</code>.
Also, you may find that event handlers need to have precise type declarations for the arguments. For example:
<code>$(go.Node, . . ., { click: function(e: go.InputEvent, node: go.GraphObject) { . . .} }, . . .</code>.
JavaScript calls to this function are unchanged by the better type declarations for <a>GraphObject,make</a>.
</li>
<li>
The HTML Divs created for the default context menu now have CSS class names: 'goCXforeground' and
'goCXbackground'.
The HTML textarea for the TextEditingTool now has the CSS class name: 'goTXarea'.
</li>
<li>
When supplied with an argument, <a>CommandHandler.expandTree</a>, <a>CommandHandler.collapseTree</a>,
<a>CommandHandler.expandSubGraph</a>, and <a>CommandHandler.collapseSubGraph</a>
incorrectly operated on the <a>Diagram.selection</a> if the argument Part was already in an expanded/collapsed
state.
This has been fixed not to do so.
</li>
<li>
Performance improvements with JumpOver/JumpGap Links.
</li>
<li>
Fixed inappropriate invalidation of link routes when a Group was moved.
</li>
<li>
Fixes for SVG rendering of Pattern brushes.
</li>
</ul>
<h4 id="2.0.0">Changes for 2.0</h4>
<p>
See the summary <a href="#2.0">above</a>.
</p>
<ul>
<li>
<b>Build GoJS from TypeScript Source:</b>
<p>
GoJS can be compiled from the TypeScript source files.
Dynamically building GoJS this way allows unused modules/code to be removed.
See the new Intro page on <a href="intro/source.html">Building GoJS from TypeScript sources</a>
</p>
</li>
<!-- don't document yet
<li>
<b>GoJS can now be loaded as an ES6 Module:</b>
<p>
GoJS can be used as a module with <code>&lt;script type="module"&gt;</code> tags.
This requires using the <code>go-module.js</code> or <code>go-debug-module.js</code> builds,
which uses <code>export const go</code>. There is an example in the <code>/samplesTS</code> directory,
<a href="samplesTS/minimalModule.html">minimalModule.html</a>.
</p>
</li>
-->
<li>
<b>GoJS now runs in DOM-less environments like Node:</b>
<p>
GoJS can run in DOM-less environments, like Node, without any dependencies.
See the new Introduction page on <a href="intro/nodeScript.html">GoJS with Node.js</a>.
</p>
<p>
GoJS cannot guarantee accurate Picture and TextBlock measuring in DOM-less environments,
so if you do not set <code>desiredSize</code> (or <code>width</code> <em>and</em> <code>height</code>) on
TextBlocks or Pictures,
you may want to use GoJS inside of a headless browser project, like Chrome's Puppeteer.
We detail how to use GoJS with Puppeteer in the <a href="intro/serverSideImages.html">Server Side Images</a>
Introduction page.
</p>
<p>
DOM-less environments can be used for server-side work, such as computing complex layouts.
Headless environments such as Puppeteer can be used to do layout calculations or to make
<a href="intro/serverSideImages.html">server-side images of Diagrams</a>.
</p>
<!-- Undocumented
<p>
DOM-less environments can be forced by calling <a>Diagram,useDom</a> with <code>false</code> as the argument.
</p>
-->
<p>See the note about <a>Diagram.viewSize</a> below.</p>
</li>
<li>
<b>Reworked part-moving and added a new class: <a>DraggingOptions</a>:</b>
<p>
<a>DraggingOptions</a> holds properties for Part-moving operations, and
<a>DraggingInfo</a> holds relative positions of dragged objects, for use in snapping and cancellation.
The <a>DraggingTool</a> has an instance of the DraggingOptions class, and
setting properties like <a>DraggingTool.isGridSnapEnabled</a> modifies this instance.
If the Diagram has no DraggingTool associated with it, it falls back to the default properties of the class.
You can create your own to pass to part-moving methods.
Typically you do not need to create an instance of this class.
</p>
<p>
Moving parts has been reworked. <a>Diagram.moveParts</a>, <a>Diagram.computeMove</a>, and
<a>CommandHandler.computeEffectiveCollection</a> now accept
an additional argument for a <a>DraggingOptions</a> instance.
This allows fine-grained control over programmatic moving of nodes.
Typically, these options are supplied by the <a>DraggingTool.dragOptions</a> instance.
</p>
<p>
<a>DraggingTool.computeMove</a> functionality has been moved to <a>Diagram.computeMove</a>,
and <a>DraggingTool.computeEffectiveCollection</a> functionality has been moved to <a>CommandHandler.computeEffectiveCollection</a>.
These methods remain on their original class for compatibility when overriding,
but the main functionality has been moved to the Diagram class for tree-shaking reasons.
</p>
</li>
<li>
<b>Diagram and Layer:</b>
<ul>
<li>
Added <a>Diagram.mouseEnter</a> and <a>Diagram.mouseLeave</a> to allow for functions to be called on
mouseenter and mouseleave events
on the Diagram's Canvas element.
</li>
<li>
When mouse leaves a Diagram, <a>Diagram.lastInput</a> is now set to the "mouseout" MouseEvent.
</li>
<li>
Added <code>"GainedFocus"</code> and <code>"LostFocus"</code> <a>DiagramEvent</a>s,
which allow functions to be called when the Diagram's canvas gains or loses focus,
without having to access any of the DOM within the <a>Diagram.div</a>.
</li>
<li>
Added <a>Diagram.findPartsAt</a>, <a>Diagram.findPartsIn</a> and <a>Diagram.findPartsNear</a> as
convenience functions.
These functions call <a>Diagram.findObjectsAt</a>, <a>Diagram.findObjectsIn</a> or <a>Diagram.findObjectsNear</a>
and only return Parts in non-temporary layers, rather than all GraphObjects.
</li>
<li>
Added <a>Diagram.viewSize</a> which can be used to set a viewport size in DOM-less environments.
See the new <a href="intro/nodeScript.html">Intro page on GoJS with Node.js</a>.
</li>
<li>
Added <a>Diagram.handlesDragDropForTopLevelParts</a> which determines whether drag-and-drop events
may be bubbled up to the diagram if not handled by a Part.
</li>
<li>
<a>Diagram.moveParts</a>, <a>Diagram.copyParts</a>, and <a>Diagram.computePartsBounds</a> now accept an
Array of parts,
in addition to their former iterable collection of Parts.
</li>
<li>
<a>Diagram.makeImage</a> and <a>Diagram.makeImageData</a> now accept <code>callback</code> and <code>callbackTimeout</code>
options.
If a callback function is provided, the methods will instead return null
and image creation will wait until all Diagram Picture sources are loaded
before creating the image and invoking the callback.
</li>
<!-- Undocumented
<li>
Added static function <a>Diagram,isUsingDom</a>, which returns true if Diagrams are using a DOM, false otherwise,
and <a>Diagram,useDom</a>, which sets whether or not GoJS should use a DOM if one is available.
</li>
-->
</ul>
</li>
<li>
<b>Models:</b>
<ul>
<li>
Added property <a>Model.copiesKey</a> which controls whether <a>Model.copyNodeData</a> and <a>GraphLinksModel.copyLinkData</a>
copy any key property of the data.
Setting this to false is useful in forcing copies from a <a>Palette</a> to get a new unique key.
The default value is true for compatibility with version 1.*.
</li>
<li>
Improved <a>Model.updateTargetBindings</a> and <a>Part.updateTargetBindings</a> to update <a>Panel</a>s
that have
<a>Panel.itemArray</a> data bound if the contents of the Array have changed.
In version 1, the reference to the Array had to have changed -- the <a>Panel.itemArray</a> had to have been
replaced.
In version 2, the <a>Panel.itemArray</a> property setter checks to see if all of the Array items have
corresponding Panels
and that all child Panels correspond to Array items (i.e. <a>Panel.data</a> refers to the Array item),
even if the new property value is a reference to the same Array that it had been before.
</li>
</ul>
</li>
<li>
<b>Parts:</b>
<ul>
<li>
Added <a>Part.rotationSpot</a> to control the Spot within the <a>Part.rotateObject</a>
that the <a>RotatingTool</a> will pivot about.
</li>
<li>
<a>Part.move</a> and <a>Part.moveTo</a> now have an additional optional boolean argument
to specify moving by location instead of position.
</li>
</ul>
</li>
<li>
<b>Panels and PanelLayout:</b>
<ul>
<li>
Spot Panels now allow child elements to stretch, which will match the size of the main element.
<a href="intro/panels.html#StretchingWithSpotPanels" target="_blank">See the Intro Page for an example.</a>
</li>
<li>
It is now possible to create your own Panel layouts with the <a>PanelLayout</a> class. This is expected to
be very uncommon,
but may serve uncommon use cases. See the <a href="samples/panelLayout.html">PanelLayout sample</a> for an
example.
There is a new static function, <a>Panel,definePanelLayout</a> for this purpose.
</li>
<li>
When building from source, it is also possible to exclude many Panel types that you are not using, to make
the resulting JS smaller.
See the <a href="intro/source.html">Intro page on building GoJS sources</a> for details.
</li>
</ul>
</li>
<li>
<b>GraphObjects and Geometry:</b>
<ul>
<li>
<a>GraphObject.cloneProtected</a> is now documented. It functions in a similar
fashion to <a>Model.cloneProtected</a> and <a>Layout.cloneProtected</a>,
and is necessary for properly copying additional properties on custom subclasses of GraphObject.
</li>
<li>
Added properties <a>Picture.flip</a> and <a>TextBlock.flip</a>, which default to <a>GraphObject,None</a>,
can be set to <a>GraphObject,FlipHorizontal</a>, <a>GraphObject,FlipVertical</a>,
or <a>GraphObject,FlipBoth</a> to flip a Picture's or TextBlock's rendering.
</li>
<li>
Added properties <a>Shape.graduatedSkip</a> and <a>TextBlock.graduatedSkip</a>, which allow ticks/labels
along a Graduated panel
to be skipped, causing gaps. These properties take a function, and default to null meaning no ticks/labels
will be skipped.
</li>
<li>
Added predefined builders for "ToolTip" and "ContextMenu" for ease of template creation.
The definitions for these builders can be found in <a href="extensions/Buttons.js">Buttons.js</a>
</li>
<li>
Added <a>TextBlock,WrapBreakAll</a> as a value for <a>TextBlock.wrap</a>,
which allows text to break at individual characters.
</li>
<li>
Added <a>TextBlock,getBaseline</a>, <a>TextBlock,setBaseline</a>, <a>TextBlock,getUnderline</a>, <a>TextBlock,setUnderline</a>,
which give more control over the height to that lines of text and underlines are drawn.
</li>
<li>
Added <a>GraphObject.getDocumentBounds</a>, as a convenient way to avoid having to call <a>GraphObject.getDocumentPoint</a>
on all four corner points of a rectangular area.
</li>
</ul>
</li>
<li>
<b>Layouts:</b>
<ul>
<li>
Documented <a>CircularNetwork</a>, <a>ForceDirectedNetwork</a>, <a>LayeredDigraphNetwork</a>, and <a>TreeNetwork</a>.
These are the subclasses of <a>LayoutNetwork</a> for their respectively-named Layouts.
</li>
<li>
Added <a>Layout.getLayoutBounds</a> method and <a>Layout.boundsComputation</a> functional property,
to support easier customization for how large the layout treats each node. This is convenient when your
nodes have
decorations or text that you do not want to consider during the layout, even if those objects might overlap
other nodes.
</li>
<li>
Documented <a>Layout.initialOrigin</a> method, to be called by overrides of <a>Layout.doLayout</a> when
used as a <a>Group.layout</a>
that may want to account for the original location of the group when the group has a <a>Group.placeholder</a>.
</li>
</ul>
</li>
<li>
<b>Tools and Commands:</b>
<ul>
<li>
<a>CommandHandler.scrollToPart</a> has been extended to automatically expand any subtrees and subgraphs
in order to make visible each <a>Part</a> that it scrolls to.
</li>
<li>
Added <a>ClickCreatingTool.isGridSnapEnabled</a>, which works like <a>DraggingTool.isGridSnapEnabled</a>
and <a>ResizingTool.isGridSnapEnabled</a>.
</li>
<li>
Added <a>RotatingTool.computeRotationPoint</a> to control the point about which the object rotates.
Added <a>RotatingTool.rotationPoint</a> to remember the result of <a>RotatingTool.computeRotationPoint</a>.
Added <a>RotatingTool.handleAngle</a> and <a>RotatingTool.handleDistance</a> to determine
where the rotation handle is placed relative to the rotation point in the <a>Part.rotateObject</a>.
A custom RotatingTool is no longer needed to position the rotation handle above the object.
</li>
<li>
Improved <a>LinkingBaseTool.copyPortProperties</a> to better handle rotated ports when setting up a
temporary port.
</li>
</ul>
</li>
<li>
<b>Brushes:</b>
<ul>
<li>
Added <a>Brush,isDark</a> instance and static methods, which determine whether a
Brush or CSS color string is "dark", based on luminance.
This can be useful in bindings to determine text colors.
</li>
<li>
Added <a>Brush,mix</a> to allow for the mixing of two CSS colors.
</li>
</ul>
</li>
<li>
<b>Samples and Extensions:</b>
<ul>
<li>
Many samples have been translated into TypeScript, in the <code>samplesTS</code> folder in the kit.
</li>
<li>
Added <a href="samples/panelLayout.html">PanelLayout</a>, demonstrating <a>Panel,definePanelLayout</a>.
</li>
<li>
Added <a href="extensionsTS/PackedLayout.html">extensionsTS/PackedLayout</a>,
which demonstrates a custom layout for packing nodes closely into a rectangular or elliptical area.
(Source is TS only)
</li>
<li>
Added <a href="samples/wordcloud.html">Wordcloud</a>, which demonstrates a wordcloud using a PackedLayout.
</li>
<li>
Added <a href="samplesTS/minimalModule.html">samplesTS/minimalModule</a>,
which demonstrates using GoJS as an ES6 module.
(Source is TS only)
</li>
<li>
Added <a href="extensionsTS/OverviewResizing.html">OverviewResizing</a>,
which demonstrates the OverviewResizingTool, used for resizing an <a>Overview.box</a>.
This has replaced functionality that used to be built-in.
It is defined in both the "extension" and "extensionsTS" folders.
</li>
<li>
Added <a href="extensionsTS/ZoomSlider.html">extensionsTS/ZoomSlider</a>,
which demonstrates an HTML slider that can zoom in/out of a GoJS diagram.
</li>
</ul>
</li>
</ul>
<h4 id="incompatible">Incompatible 2.0 changes and removals</h4>
<p>
Many of the minor changes were made to order to increase the modularity of the implementation.
Nevertheless we have tried to maintain API compatibility with version 1.*.
</p>
<ul>
<li>
<b>Most Predefined Shape figures</b>
<p>
In order to shrink the size of the GoJS library we no longer define most predefined figures in the library.
Instead, you can find all of their definitions in the <a href="extensions/Figures.js" target="_blank">Figures.js</a>
file.
You can load this file or simply load only those figures that you want to use by copying their definitions
into your code.
For example, the <a href="samples/shapes.html">Shapes sample</a> loads this file.
<p>
A number of very common figures remain predefined in version 2.0.
The figures that remain in 2.0 are: "Rectangle", "Square", "RoundedRectangle", "Border", "Ellipse",
"Circle",
"TriangleRight", "TriangleDown", "TriangleLeft", "TriangleUp", "Triangle", "Diamond", "LineH", "LineV",
"BarH", "BarV", "MinusLine", "PlusLine", "XLine".
<p>
Note also that the definitions that are in the <a href="extensions/Figures.js" target="_blank">Figures.js</a>
file
are <em>not</em> entirely the same as their definitions in version 1.*.
A number of figures have been improved and some figure parameters have been added or changed meaning.
To use the old predefined figures, you can load or copy from the "extensions/Figures.js" file of an
earlier version of GoJS.
<p>
The static function <a>Shape,defineFigureGenerator</a> now has additional checks for geometric
validity.
To be valid, the generated Geometry bounds must be equal to or less than the supplied width and height.
</li>
<li>
<strong>List, Set, and Map constructors no longer take type arguments, but are generic in TypeScript</strong>
<p>
The GoJS <code>List</code>, <code>Set</code>, and <code>Map</code> constructors no longer take
type arguments and no longer do type checking in JavaScript.
However, when using TypeScript these classes are now generic and will do type checking at compile time.
</p>
<p>
In JavaScript, instead of <code>new go.List(go.Point)</code>, write <code>new go.List()</code>.
For compatibility, you can still provide an element type argument, but it is not used and not checked.
</p>
<p>
In TypeScript, instead of <code>new go.List(go.Point)</code>, write <code>new go.List&lt;go.Point&gt;()</code>,
and the TypeScript compiler will enforce the List element typing.
</p>
<p>
All three constructors now take an optional <a>Iterable</a> or <code>Array</code> argument that
provides the initial elements for the new collection.
</p>
<p>
In a future major version, we may replace <code>go.Map</code> and <code>go.Set</code> with
enhanced ES6 <code>Map</code> and <code>Set</code> classes.
</p>
</li>
<li>
<a>List.add</a>, <a>Set.add</a>, and <a>Map.add</a> now all return the collection itself instead of a boolean.
This is for increased compatibility with ES6 <code>Map</code> and <code>Set</code> collections.
</li>
<li>
<strong><a>Panel.type</a> used to be of type <a>EnumValue</a> and now is of type <a>PanelLayout</a>. </strong>
<p>
This may affect data-bindings, in the uncommon case where a template binds <a>Panel.type</a>.
You should make sure that any data bindings are returning possible type values such as <code>go.Panel.Horizontal</code>.
Data binding <a>Panel.type</a> without using a conversion function will not work with old data,
since the property has changed type.
</p>
</li>
<li>
<strong>
For Spot Panels, the <code>offsetX/offsetY</code> of <a>GraphObject.alignmentFocus</a> has been
reversed.
</strong>
<p>
If you are using the <code>offsetX/offsetY</code> values in <a>GraphObject.alignmentFocus</a>,
this may cause your panels to be arranged differently.
You will need to flip the sign to retain compatibility.
</p>
<p>
This change is to rectify a design inconsistency with Spot Panel elements.
The <code>offsetX/offsetY</code> values now correctly offset the alignment focal point,
and not the Spot Panel's element itself.
</p>
</li>
<li>
<b>CommandHandler.defaultScale</b> has been moved to <a>Diagram.defaultScale</a>
As with many of the other properties and methods that have been "moved" to other classes,
this is to improve the ability to tree-shake code out of your app.
</li>
<li>
<b>DiagramEvent.cancel</b>
<p>
The only use for this property was with the <code>"SelectionDeleting"</code> <a>DiagramEvent</a>
in order to prevent the user from deleting the selection.
Where one might have written this Diagram listener:
<pre>"SelectionDeleting": function(e) {
if (e.diagram.selection.any(function(p) { return p.data.key.indexOf("e") >= 0; })) {
e.cancel = true;
}
}</pre>
one can write the equivalent functionality with this <a>CommandHandler.canDeleteSelection</a> method
override:
<pre>"commandHandler.canDeleteSelection": function() {
return !this.diagram.selection.any(function(p) { return p.data.key.indexOf("e") >= 0; })
&amp;&amp; go.CommandHandler.prototype.canDeleteSelection.call(this);
}</pre>
Overriding the method supports the updating/enablement of commands that call <a>CommandHandler.deleteSelection</a>.
Furthermore not having a "cancel" property on the DiagramEvent avoids any potential problems that might occur
if there
are multiple listeners for the <code>"SelectionDeleting"</code> event.
The <code>"SelectionDeleting"</code> <a>DiagramEvent</a> remains useful,
but not for controlling whether or not the deletion should happen.
</li>
<li>
<b>Button styling</b>
<p>
Updated the styling of buttons. Buttons are now rounded rectangles and have an effect when pressed.
Some predefined buttons have increased a small amount in size:
<ul>
<li><b>TreeExpanderButton:</b> 3 pixels wider and taller</li>
<li><b>SubGraphExpanderButton:</b> 3 pixels wider and taller</li>
<li><b>PanelExpanderButton:</b> 3 pixels wider and 5 pixels taller</li>
</ul>
Definitions for buttons can be found in the <a href="extensions/Buttons.js" target="_blank">Buttons.js</a>
file.
</li>
<li>
Improved computation of <a>Link.midPoint</a> and <a>Link.midAngle</a> to be faster and
changed some cases where labels fell on very small segments of a link.
Orthogonal bezier links will also have more accurate label placement with the new methods.
</li>
<li>
<a>Diagram.initialContentAlignment</a>'s default value of <a>Spot,Default</a> now acts like <a>Spot,Center</a>,
instead of <a>Spot,None</a>.
Basically, if you don't set <a>Diagram.initialContentAlignment</a>,
the contents will now show up in the middle of the viewport rather than at the top-left corner.
</li>
<li>
Custom <a>TextEditingTool</a>s (the values of <a>TextEditingTool.currentTextEditor</a> and <a>TextBlock.textEditor</a>)
can no longer be set to HTML Elements.
They must be an instance of <a>HTMLInfo</a>, which was introduced in version 1.7.
</li>
<li>
The <a>ResizingTool</a>, when computing a cell size <a>ResizingTool.computeCellSize</a>,
no longer checks the <a>DraggingTool</a>'s possible grid snapping cell size.
As with many of the other properties and methods that have been "moved" to other classes,
this is to improve the ability to tree-shake code out of your app.
</li>
<li>
Swapped the order of the <a>RotatingTool</a> and <a>ResizingTool</a> in the <a>ToolManager.mouseDownTools</a>
list.
This is to cause the RotatingTool's Adornment to be behind the ResizingTool's Adornment if both are present.
</li>
<li>
Moved the <a href="extensions/OverviewResizingTool.js">OverviewResizingTool</a>,
which had been completely internal, out of the core library into an extension.
The <a>Overview.box</a> can no longer be resized unless OverviewResizingTool has been loaded.
</li>
<li>
Removed <strong>GraphObject.fromEndSegmentDirection</strong> and <strong>GraphObject.toEndSegmentDirection</strong>.
One can override <a>Link.getLinkDirection</a> to achieve the same effects.
</li>
<li>
Changed <a>Link.getLinkPoint</a> to treat a <a>GraphObject.fromSpot</a> or <a>GraphObject.toSpot</a> with
<a>Spot.x</a> and <a>Spot.y</a> exactly 0.5 (but with any <a>Spot.offsetX</a> and <a>Spot.offsetY</a>)
as if it were <a>Spot.None</a> but focussing on that spot.
This allows for links to stop at the edge of a shape while going towards a point other than the center of the
port.
In the past the link direction for spots at (0.5, 0.5) was always assumed to be zero,
going rightwards to or from the port, which was not intuitive or useful.
</li>
<li>
The <a>DiagramEvent.subject</a> for "SelectionMoved" and "SelectionCopied" <a>DiagramEvent</a>s is now a <a>Set</a>
of the moved or of the newly copied Parts, not just the <a>Diagram.selection</a>.
This makes it easier to find the unselected Parts that were moved or copied.
</li>
<li>
The <a>LayoutNetwork</a> constructor and constructors for subclasses of <a>LayoutNetwork</a>
now require the <a>Layout</a> as the first argument.
This was needed for better code, to avoid potential null references.
</li>
<li>
The <a>LayoutVertex</a> and <a>LayoutEdge</a> constructors and constructors for subclasses of <a>LayoutVertex</a>
and <a>LayoutEdge</a> now require the <a>LayoutNetwork</a> as the first argument.
This was needed for better code, to avoid potential null references.
</li>
<li>
<a>Placeholder</a>s in <a>Group</a>s now take up zero size when collapsed,
even when there is padding in the <a>Placeholder</a>.
You can add a <a>GraphObject.margin</a> on the Placeholder or
specify its <a>GraphObject.minSize</a> to make sure that has a size when collapsed.
<a>Placeholder</a>s in <a>Group</a>s now respect <a>GraphObject.minSize</a>.
</li>
<li>
<a>Layout.isRealtime</a> is now tri-state, with possible values being true, false, or null.
The default is now null.
A null value is treated as true for a <a>Diagram.layout</a> but false for a <a>Group.layout</a>.
This reduces the number of situations where there can be surprising layout behavior when moving
or resizing member nodes, while continuing to support explicit control of this property.
</li>
<li>
<a>Diagram.scrollsPageOnFocus</a> has changed its default value from true to false.
This avoids an occasional end-user complaint.
</li>
<li>
<a>Diagram.allowDrop</a> has changed its default value from false to true.
This helps avoid a common error when starting to use a <a>Palette</a> or a second <a>Diagram</a>.
</li>
<li>
<a>Overview</a>s now include the observed diagram's viewport bounds so the <a>Overview.box</a> will always be
visible.
This reduces confusion that some end-users experience.
</li>
<li>
<a>Tool.doCancel</a> now sets <a>Tool.transactionResult</a> to null before calling <a>Tool.stopTool</a>,
in order to cause any call to <a>Tool.stopTransaction</a> to roll-back any transaction.
</li>
</ul>
<hr />
<h4>Changes for 1.* are <a href="../1.8.38/changelog.html">here</a>.</h4>
</div> <!-- end container -->
<script src="assets/js/jquery.min.js"></script>
<script async src="assets/js/bootstrap.min.js"></script>
</body>
</html>

Опубликовать ( 0 )

Вы можете оставить комментарий после Вход в систему

1
https://api.gitlife.ru/oschina-mirror/xieshaoping-GoJS.git
git@api.gitlife.ru:oschina-mirror/xieshaoping-GoJS.git
oschina-mirror
xieshaoping-GoJS
xieshaoping-GoJS
master