yFiles AJAX Changelog
This file documents the feature enhancements and API changes to previous yFiles AJAX versions.
yFiles AJAX 2.2 changes since 2.1.1
- yFiles AJAX is now bundled with yFiles for Java 18.104.22.168 and ySVG 2.5.
- yFiles AJAX is now based on Dojo 1.10.4
- The edge realizer set with method
UpdateServlet#setDefaultEdgeRealizer(EdgeRealizer)was not used in
Changes in Technical Requirements
- The SVG functionality (SVG mode, rendering of SVG nodes, and SVG export) provided by the bundled ySVG libraries now requires at least Java 1.6, due to upgrading to ySVG 2.5. To enable SVG functionality with older Java releases, use a previous (2.4.x) ySVG release, or the ySVG JARs (
batik.jar) bundled with a previous yFiles AJAX release (ySVG 2.4 uses Batik 1.7, while ySVG 2.5 uses Batik 1.8).
yFiles AJAX 2.1.1 Changes Since 2.1
- yFiles AJAX is now bundled with yFiles for Java 22.214.171.124
onSVGLoadingFailedcallbacks to the client-side
- Improved error handling for servlet requests: instead of just returning a 404 status code, the servlets will now return a status code adequate to the error condition (400 (bad request), 404 (not found), or 500 (internal server error)), and write an error message to the response stream.
- Image tiles were requested even when the graph was not loaded yet, causing 404 errors and HTTP session problems.
- The client-side
GraphCanvas#paintDetailThresholdproperty had no effect in bitmap mode.
HierarchyManagerwas registered with the provided graph.
- The group node open/close operation sometimes didn't work in Chrome.
yFiles AJAX 2.1 changes since 2.0.1
- yFiles AJAX is now bundled with yFiles for Java 2.10
- yFiles AJAX is now based on Dojo 1.8.3
- All yFiles AJAX demo sources were adapted to HTML5 and Dojo 1.8.3. Most deprecated Dojo calls were replaced accordingly.
- The client-side
MoveViewportInputModenow uses a css class instead of a hardcoded css property in order to change the cursor icon.
- The new
GenericGroupNodeStateLabelProviderinterface and the default
StateLabelProviderPainterimplementation can be used to enable client-side expand/collapse functionality when using
- The new DynamicGraphDemo shows how to create a graph dynamically on the server, and how to use
GenericGroupNodeRealizersin yFiles AJAX applications.
- Fixed a concurrency issue that could lead to
IllegalPathStateExceptions on the server.
- Fixed the
setNodeURL(), setEdgeURL(), setNodeDescription() and setEdgeDescription()convenience methods provided by the
com.yworks.yfiles.server.tiles.servlet.BaseServletto create the corresponding data provider if doesn't already exist. Also, the corresponding data provider keys are now public.
- The client-side mouse position that can be accessed from the server-side
ActionContextinstance now uses correct world coordinates.
- All JSON server responses now don't use "JSON prefixing" anymore, making it possible to parse the responses with JSON.parse(). This behavior can be reverted to use JSON prefixing using the
yFiles AJAX 2.0.1 changes since 126.96.36.199
- Improved the server libraries thread safety handling in order to prevent deadlocks that could occur in combination with some servlet container implementations.
- Added a read/write lock API that is now used by the library and demo Servlets instead of simple synchronization in order to fix concurrent modification issues.
mouseClickTimeproperties on the client-side
GraphCanvasto configure when mouse down and up events are considered mouse clicks for the graph canvas.
- Improved the
setRenderMode()implementation of the client-side graph canvas to switch modes without flickering.
- Fixed the client-side
GraphCanvas#updateWorldBounds()method to properly call the
onWorldBoundsChanged()callback when the world bounds changed.
- Fixed a mouse event handling problem that prevented the
RectangularSelectionModefrom working in Internet Explorer.
- Fixed a bug that could cause the svg element to be misplaced when switching from bitmap mode to svg mode.
clear()function of the graph canvas will now correctly clear cached image tiles in bitmap mode and remove the SVG graphic in SVG mode.
yFiles AJAX 188.8.131.52 changes since 2.0
- yFiles AJAX is now bundled with yFiles for Java 184.108.40.206
- The yFiles AJAX license data can now be specified programmatically using the static method
BaseServlet#registerLicense(String)as an alternative to deployment of the license file to the
- Removed library usages of
event.layerY(deprecated in WebKit browsers). Note that because the bundled Dojo version still references these properties, deprecated warnings can still appear when running yFiles AJAX applications in Chrome.
- If the
LoaderServletfails to load the requested graph, an error message will now be logged in addition to returning a 404 status.
- All Demos: The
RequestIndicator("loading…" message) will now correctly disappear in Internet Explorer versions 7 and 8.
- GraphEditor Demo: The graph is now correctly updated after a layout calculation in SVG mode.
- GraphEditor Demo: Removed scrollbars that appeared in some browsers in the overview window.
- Basic Demo: The SVG mode button now works correctly.
- A bug in
GroupNavigationModewas fixed that caused the expand/collapse operations for group nodes to be triggered during viewport drag gestures.
- A bug in
MoveViewportInputModewas fixed that caused mouse clicks to set the the move cursor, even when no drag gesture was started.
yFiles AJAX 2.0 changes since 1.4
Major New Features
- New SVG Render Mode: In addition to the existing bitmap tile mode, the graph visualization can now be rendered as a SVG document in supported browsers.
- Touch Support: The yFiles AJAX client now supports navigation gestures on touch devices (iOS, Android).
- yFiles AJAX is now based on Dojo 1.6.1 and uses yFiles for Java 220.127.116.11 on the server.
- The SimpleAttributeDemo has been added to show how custom attributes associated with graph items can be retrieved and displayed on the client.
- The OrgChartEditorDemo has been added as a showcase application featuring both mouse and touch gesture support.
- All demos now provide a toggle button that can be used to switch between SVG Mode and Bitmap Mode.
- Some demo applications have been modified to provide a better user experience on touch devices.
- The new class
ViewportLimitermakes it possible to conveniently restrict the explorable region of a
GraphCanvasnow offers a
viewportLimiterproperty for this purpose, and all means of adjusting the viewport interactively were adapted to query the limiter. Also, methods
decreaseZoom(factor)have been added to provide a means of zooming while respecting the viewport limits.
- The new
GraphCanvascan be used to decide whether to zoom to the current mouse position or to the center of the canvas.
- The new
NavigationInputModeis now responsible for providing both mouse and touch navigation functionality. It uses the new
PinchInputModeclasses to handle mouse and touch panning, and zooming on touch devices, respectively.
- The new
paintDetailThresholdproperty of class
GraphCanvascan be used to set the zoom value that triggers sloppy rendering on the client.
- Various touch input related properties have been added to the
- Similar to the existing mouse events related to graph items, the
GraphCanvasnow provides corresponding events that are dispatched when a graph item is hit by a touch gesture (tap, long press, or double tap).
- A number of low-level touch events have been added to the
Rubberbandhas been improved to support touch input.
ViewPortMarkerwidget that can be used to create an interactive overview canvas has been improved to support the
ViewportLimiterand touch input.
- For convenience, the method
GraphCanvas#getMousePosition()will now also consider touch events.
GraphCanvasproperties related to the added SVG support:
- New method
GraphCanvas#setRenderMode(mode)can be used to switch the client-side render mode on the fly. The current render mode can be queried using
- In SVG Mode, a new SVG image can be requested from the server using method
onSVGLoaded()have been added to notify clients when a SVG image request is started and finished by the
- The behavior of the
GraphCanvas#fitContent()has been improved to reduce the amount of server requests in Bitmap Mode.
- Various convenience methods for manipulating and querying the canvas viewport and the graph's world coordinates have been added to class
- A bug was fixed in method
GraphCanvas#getViewCoordinates(x,y)that caused the method to treat
yparameters of value
0as if the parameter was not defined.
Configuring the interactive behavior of the
GraphCanvasnow behaves differently:
In previous versions, panning was handled by the
GraphCanvasitself. Now, the canvas uses the new
NavigationInputModeto handle panning (both mouse-based and touch-based).
Whether or not the mouse wheel triggers zooming is now controlled by the additional
mouseWheelZoomproperty. Hence, calling
setPanMode()will now create and activate a
setNoInteractionMode()will disable the navigation mode and
As the canvas now doesn't handle view point movement anymore, the callbacks
onFirstMove()have been removed.
As the behavior of
GraphCanvas#fitContent()has changed to reduce the amount of server requests in Bitmap Mode, this may cause problems in rare cases where the world bounds actually changed during the
fitContent()call. For details on this incompatibility, please see the corresponding section in the README.
yFiles AJAX 1.4 changes since 1.3
- There is a new
ResizeNodesModefor resizing a set of selected nodes. It is integrated as a child input mode into the
EditModeand featured in the Graph Editor demo.
- yFiles AJAX now supports Undo/Redo. This is demonstrated in the Graph Editor demo.
- The directory layout of the yFiles AJAX distribution has been improved. The distribution no longer contains a prebuilt web application archive (war). Instead, an Ant script is included that allows to easily build the web application, and detailed documentation has been added for the configuration of yFiles AJAX projects in various IDEs. A detailed description of the new directory structure can be found in the README file.
- The yFiles for Java library, which is used for the server side of yFiles AJAX, is now part of the distribution.
- yFiles AJAX is now based on Dojo 1.5 and uses yFiles for Java 2.8 on the server.
- ySVG is no longer bundled with yFiles AJAX. Optionally, ySVG can be used to enable SVG support.
- To enable additional scalable graphics export functionality, yExport can be used together with yFiles AJAX 1.4.
- yFiles AJAX now supports Firefox 3.5 and 3.6 and Internet Explorer 6, 7 and 8. Firefox 3.0 is no longer supported, since Dojo does not support it any more.
- The layered Dojo build files
yfiles-ajax-base.jshave been merged into a single file
yfiles-ajax.js. The layer file
yfiles-ajax-complete.jspreviously used in some of the demos which additionally contained the yFiles AJAX client-side demo sources and resources has been removed.
- Applications written for yFiles AJAX 1.3 should also run with yFiles AJAX 1.4 on the client side after adjusting the directives for including the yFiles AJAX client-side components as indicated above. On the server side some changes are needed, if the application uses some of the few APIs in yFiles for Java which were incompatibly changed. This applies mainly to label models. See the yFiles for Java Developer's Guide for details.
- If ySVG is present, the graphs can be exported to SVG (using a "downloadGraph" request to the LoaderServlet).
- When a set of nodes is moved, the bends of edges connecting to moving nodes are moved, too.
- The new
onTilesLoadedcallbacks of the
GraphCanvaswidget can be used to monitor server requests that update the client-side graph visualization. The demo
RequestIndicatorwidget uses these callbacks in order to notify the user of running requests in most yFiles AJAX demo applications.
- The handling of group nodes while editing the graph has been improved. Group nodes grow, if this is necessary to encompass all of our their child nodes as before. Group nodes do no longer shrink unless they are explicitly resized.
GroupNavigationMode's enter/exit functionality now also works on Mac. A custom function that identifies an enter/exit event can now be set.
- The ports of edges at a group node sometimes lost contact to the group node, if a child node of the group node was deleted or resized.
- The Dojo build file
yfiles-ajax-complete.jsdid not contain the new demo sources.
- In the OrgChart demo disabling business units in global view mode did not work correctly, if there were collapsed business units.
yFiles AJAX 1.3 changes since 1.2
- A new demo has been added which displays the organization chart of a company. Several possible application features are demonstrated.
- Another new demo, the network monitoring demo, shows how live state of a network can be queried and displayed.
- The graph canvas shows a configurable loading image, if it is waiting for tiles from the server and no old scaled tiles are available.
- It is now possible to restrict the range of possible zoom values for the graph canvas.
- The new client-side class
GraphHighlightereases customized highlighting of nodes and/or edges. Its usage is demonstrated in the OrgChart demo.
- yFiles AJAX is now based on Dojo 1.4.0 and yFiles for Java 2.7. Older versions of yFiles for Java on the server are no longer possible.
- yFiles for Java 2.7 includes support for the GraphML file format. Thus, the separate graphml.jar in the yFiles AJAX distribution is no longer necessary and has been removed.
- yFiles AJAX ships with the ySVG extension package as before (with the new version 2.2), but does no longer rely on it. If your graphs do not use SVG nodes, you can now deploy your web application using yFiles AJAX without the
- Applications written for yFiles AJAX 1.2 should also run with yFiles AJAX 1.3 on the client side. On the server side some changes may be needed, if the application uses GraphML directly. The GraphML API did not change much, but the classes reside in different packages. See the yFiles for Java Developer's Guide for details.
- yFiles AJAX now supports Firefox 3.0 and 3.5 and Internet Explorer 6, 7 and 8. Firefox 1.x and 2.x are no longer supported, since Dojo does not support them any more.
- Handling the requests for custom realizer images (as used by the palette in the Graph Editor demo) has been moved from the UpdateServlet to the new PaletteServlet.
- The graph canvas uses scaled old tiles in fitContent while waiting for new tiles from the server. This technique already existed, but was only used for setZoom.
- If the canvas is dragged while the mouse is over a node an onMouseOutNode event is fired. An onMouseOverNode event is fired when the drag ends. This eases tooltip handling for example.
- The demos and demo graphs have been brushed up.
- Configuring the defaults and registering custom node realizers in the UpdateServlet has been improved.
- A workaround for a bug in Internet Explorer now prevents that the overview marker becomes opaque. This happened, if the overview marker was once wider or higher than 4096 pixels. Even if it became smaller again it stayed opaque.
- View configurators with no other reference were garbage collected. This has been fixed.
- The pathSet function of the canvas was not called, if the new graph was empty.
yFiles AJAX 1.2 changes since 1.1.2
- The new action framework simplifies adding custom server side functionality to an application using yFiles AJAX.
- A new API was introduced for customizing the views (and the renderers) used for creating image tiles of a graph on the server.
- The new Treasure Hunt tutorial and the new Swimlanes demo application provide examples for using the action framework. Moreover, the Swimlanes demo also uses ViewConfigurators.
- yFiles AJAX is now based on Dojo 1.2.1.
- The demo applications for yFiles AJAX now depend yFiles for Java 2.6, while yFiles AJAX itself still works with yFiles for Java 2.5.
- Some static support methods of the BaseServlet like newGraph and cacheGraph were protected. They are now public, so they can be used without inheriting from the BaseServlet.
- We added a workaround for an Internet Explorer bug which under certain circumstances resulted in an offset of the preview line for a customized CreateEdgeMode.
- The layout call in the LayoutServlet is also encapsulated in a protected method (doLayout) in order to provide better customization possibilities. Previously only the creation of the layouter (createLayouter) was customizable.
- There is a new optional parameter customData for the methods changing a graph in the client side Graph and HierarchyManager classes. These methods are asynchronous and use callbacks to notify the client side application when the requested operation succeeded or failed. The customData is not sent to the server, but it is passed to these callbacks. This enables associating extra data with specific calls which can then be used in client side post processing.
- The name of the license file is no longer fixed. It can be configured with a context parameter of the web application.
- Fixed race conditions which sometimes created NullPointerExceptions in BaseServlet.writeWorldBounds.
- The pathSet function on the canvas was sometimes called, before the hit test data for the new graph was also loaded. Client code connected to pathSet, which depended on the hit test data for the new graph (e.g. highlighting a node in the new graph), was affected. Now pathSet is not called before the new hit test data is available.
- Exceptions occurred occasionally on the server, if the user ran two instances of the grouped graph demo. The UpdateServlet no longer tries to close already closed groups or to open already open groups, which lead to exceptions in yFiles for Java.
- Moving a group node to its own subgraph is now just ignored instead of creating an infinite recursion on the server.
yFiles AJAX 1.1.2 changes since 1.1.1
- It is now possible to set a maximum zoom level for the
fitContentfunction of a
GraphCanvas. This is demostrated in the demos (e.g. Graph Viewer demo).
- The pre-compiled server side demo classes are now packaged in the separate
yfiles-ajax-demos.jarinstead of being part of the
yfiles-ajax.jarwith the product classes.
- yFiles AJAX now ships with GraphML 3.1.
EditModeis now configurable and customizable. Configuration includes for example enabling or disabling the creation of new nodes. Customization includes for example using your own function for creating nodes.
CreateEdgeModeis now customizable.
- The error handling of the build script was improved.
- The Grouped Graph demo failed in a local installation, if the
y.jarfile from a yFiles for Java 2.6 distribution was used (instead of yFiles for Java 2.5).
- The functions
isNormalNodefor the client side
- Under some circumstances the
EditModeproduced "this._canvas.getHitTest().getElementType is not a function" errors.
MoveSelectionModesometimes produced errors when trying to move a node.
- For failed edge creations
onNodeCreationFailedwas called instead of
- For failed node creations
onNodeCreatedwas called instead of
- The second tutorial did not work, if the sources were extracted using the
yFiles AJAX 1.1.1 changes since 1.1
- The number of server requests made for resizing an overview GraphCanvas has been significantly reduced. As a result for example the new overview in the Graph Viewer demo is available much earlier after dragging one of the splitters.
GroupNavigationModenow keeps track of group nodes closed on switching the display to their subgraph and reopens them on returning from their inner graph. Previously, after entering an open group node and returning from it, the group node was closed.
- A further customization hook has been added to the
LoaderServlet, the method
customizeGraphMLIOHandler, which can be used to add custom attributes to be read from a GraphML file or written to it. This is not possible with the
getIoHandlermethod, since it has no access to the graph instance used for reading or writing.
Incompatible API Changes
- The client side function
HierarchyManager#getVisibleGraphParent()does not take a parameter any more. It had an unnecessary
yFiles AJAX 1.1 changes since 1.0.1
- If yExport is present on the server, the LoaderServlet automatically provides the download formats PDF, SWF, EMF and EPS which are supported by yExport.
- A new Grouped Graph Demo has been added.
- yFiles AJAX is now based on Dojo 1.0.
- Support for grouping and folding of nodes has been added.
- yFiles AJAX is packaged with the new layered build system of Dojo. This enables using custom Dojo builds as a basis for yFiles AJAX instead of the Dojo release which ships with yFiles AJAX (Dojo 1.0.2).
- Styles for yFiles AJAX widgets have been separated into necessary style (e.g. positioning of tiles in the graph canvas) and optional style (e.g. color of selected graph elements in the graph canvas). The latter can be customized by changing the centralized yfiles AJAX style sheet.
- The Graph Editor demo now ships with client side source code.
- The visual effect for zooming with the mouse wheel has been improved.
- There is a new field
GraphCanvaswidget, which can be used to control the amount of zoom change,
- A new request for available download formats has been added to the LoaderServlet. An example for its usage can be found in the Graph Editor.
- For the highlight rectangle for a node, the additional width and height is now constant and does no longer depend on the size of the node and the zoom level. There is a new field
GraphCanvaswidget, which can be used to control the additional width and height.
- The client API documentation has been completed. It is available in the
docs/client/apidirectory of the deployed yFiles AJAX web application and there is a link to it from the developer's guide.
- Selecting an edge inside an open group node is now possible.
- Fixed a bug which prevented proper deacivation of the rubberband. This bug showed up, when you canceled a zoom area operation in the Graph Viewer demo by deselecting the zoom area button. The rubberband showed up on the next mouse drag.
Incompatible API Changes
- The protected method
LoaderServlet#getFileForGraphName(String)has been removed, since loading graphs from files might not be possible for some servlet containers and/or configurations. A new method
LoaderServlet#getGraphResourceStream(String)has been introduced, which can now be used to customize the selection of graph resources in derived servlets instead of the removed method. It returns an input stream instead of a file. The default implementation uses
- The protected method
LoaderServlet#loadableGraphs(HttpServletResponse)still has the same signature, but does no longer return a list of all files in the subdirectory
resources/graphs/of the web application. Instead it returns the contents of the resource
LoaderServlet#LOADABLE_GRAPHS_LIST. This way the method can also work in an environment where all resources are fetched via the servlet container.
Porting to Dojo 1.0
If you already developed an application with yFiles AJAX 1.0, which you want to upgrade to take advantage of the new version 1.1 of yFiles AJAX, the main work is probably upgrading to Dojo 1.0. The client side API of yFiles AJAX did not change much, but the Dojo API did. There is a lot of documentation for porting applications to Dojo 1.0 on the Dojo website. At the time of this writing it can be found in "documentation" >> "Dojo Porting Guides".
Here is a list of some changes in Dojo, which were the most relevant for porting yFiles AJAX itself. This is not intended as a replacement for the information on the Dojo website, but as a sort of quick introduction to the topic from the yFiles AJAX perspective.
dojo.io.bindno longer exists. The
methodattribute has been removed from the arguments object of the successor functions
dojo.xhrPost. Instead of a
mimetypeattribute, there is now a
handleAsattribute. Its values do no longer follow the mime conventions. An important new value is
errorcallbacks has changed.
- Most of the subpackages of Dojo such as
dojo.htmlno longer exist. Some functions moved to the
dojo.event.connect, see below), some do no longer exist.
dojo.connect. Remove the
dojo.require("dojo.event.*")statement and keep track of the handle which is returned by the connect call, if you want to disconnect again, because disconnect now needs the handle.
dojo.event.connectOnceno longer exists.
- The wildcard notation as in
dojo.require("dojo.event.*")is no longer supported.
- Several widgets moved from
dojoxor one of their subpackages.
dojoTypeattribute for specifying a widget in the HTML markup now expects the fully qualified class name as its value, e.g. use
dojo.html.getMarginBoxand similar functions no longer exist. You can now use
dojo.marginBox, but be aware that the returned object has a an attribute
winstead of the former
yFiles AJAX 1.0.1 changes since 1.0
- BaseServlet: Cached graphs can be removed from the cache. They could only be overwritten before.
- A newer version of GraphML is bundled with yFiles AJAX. Together with the new ySVG library mentioned above it is now possible to export a graph with SVG nodes from the yFiles AJAX editor demo as a GraphML file, which can be read by the current yEd graph editor without loosing the SVG data for the nodes.
- Graph Viewer Demo: Tooltips are now correctly displayed with Internet Explorer 7.
- LoaderServlet: URL and Description of downloaded graphs were not written.
- LoaderServlet: An exception occurred, if the "bmp" format was not available.
- SVG: a new version of ySVG ships with yFiles AJAX. It contains a fix for a rare bug leading to an infinite loop while painting SVG nodes on the yFiles AJAX server.
- HitInfo: The end points of the path for an edge were the source and target ports of the edge instead the ends of the visible path of the edge (source and target intersection). This is relevant, if node events are disabled and edge events are enabled for a GraphCanvas.
- The web.xml template in the developers guide was missing in the binary distribution.
- InfoServlet: Labels transfered were not correctly escaped.