This file documents the feature enhancements and API changes to previous yFiles AJAX versions.
UpdateServlet#setDefaultEdgeRealizer(EdgeRealizer)was not used in
batik.jar) bundled with a previous yFiles AJAX release (ySVG 2.4 uses Batik 1.7, while ySVG 2.5 uses Batik 1.8).
onSVGLoadingFailedcallbacks to the client-side
GraphCanvas#paintDetailThresholdproperty had no effect in bitmap mode.
HierarchyManagerwas registered with the provided graph.
MoveViewportInputModenow uses a css class instead of a hardcoded css property in order to change the cursor icon.
GenericGroupNodeStateLabelProviderinterface and the default
StateLabelProviderPainterimplementation can be used to enable client-side expand/collapse functionality when using
GenericGroupNodeRealizersin yFiles AJAX applications.
IllegalPathStateExceptions on the server.
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.
ActionContextinstance now uses correct world coordinates.
mouseClickTimeproperties on the client-side
GraphCanvasto configure when mouse down and up events are considered mouse clicks for the graph canvas.
setRenderMode()implementation of the client-side graph canvas to switch modes without flickering.
GraphCanvas#updateWorldBounds()method to properly call the
onWorldBoundsChanged()callback when the world bounds changed.
RectangularSelectionModefrom working in Internet Explorer.
clear()function of the graph canvas will now correctly clear cached image tiles in bitmap mode and remove the SVG graphic in SVG mode.
BaseServlet#registerLicense(String)as an alternative to deployment of the license file to the
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.
LoaderServletfails to load the requested graph, an error message will now be logged in addition to returning a 404 status.
RequestIndicator("loading…" message) will now correctly disappear in Internet Explorer versions 7 and 8.
GroupNavigationModewas fixed that caused the expand/collapse operations for group nodes to be triggered during viewport drag gestures.
MoveViewportInputModewas fixed that caused mouse clicks to set the the move cursor, even when no drag gesture was started.
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.
GraphCanvascan be used to decide whether to zoom to the current mouse position or to the center of the canvas.
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.
paintDetailThresholdproperty of class
GraphCanvascan be used to set the zoom value that triggers sloppy rendering on the client.
GraphCanvasnow provides corresponding events that are dispatched when a graph item is hit by a touch gesture (tap, long press, or double tap).
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.
GraphCanvas#getMousePosition()will now also consider touch events.
GraphCanvasproperties related to the added SVG support:
GraphCanvas#setRenderMode(mode)can be used to switch the client-side render mode on the fly. The current render mode can be queried using
onSVGLoaded()have been added to notify clients when a SVG image request is started and finished by the
GraphCanvas#fitContent()has been improved to reduce the amount of server requests in Bitmap Mode.
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
GraphCanvas now behaves differently:
In previous versions, panning was handled by the
GraphCanvas itself. Now, the canvas uses the new
NavigationInputMode to handle panning (both mouse-based and touch-based).
Whether or not the mouse wheel triggers zooming is now controlled by the additional
mouseWheelZoom property. Hence, calling
setPanMode() will now create and activate a
NavigationInputMode instance, while
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.
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-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.
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.
GroupNavigationMode's enter/exit functionality now also works on Mac. A custom function that identifies an enter/exit event can now be set.
yfiles-ajax-complete.jsdid not contain the new demo sources.
GraphHighlightereases customized highlighting of nodes and/or edges. Its usage is demonstrated in the OrgChart demo.
fitContentfunction of a
GraphCanvas. This is demostrated in the demos (e.g. Graph Viewer demo).
yfiles-ajax-demos.jarinstead of being part of the
yfiles-ajax.jarwith the product classes.
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.
y.jarfile from a yFiles for Java 2.6 distribution was used (instead of yFiles for Java 2.5).
isNormalNodefor the client side
EditModeproduced "this._canvas.getHitTest().getElementType is not a function" errors.
MoveSelectionModesometimes produced errors when trying to move a node.
onNodeCreationFailedwas called instead of
onNodeCreatedwas called instead of
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.
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.
HierarchyManager#getVisibleGraphParent()does not take a parameter any more. It had an unnecessary
GraphCanvaswidget, which can be used to control the amount of zoom change,
GraphCanvaswidget, which can be used to control the additional width and height.
docs/client/apidirectory of the deployed yFiles AJAX web application and there is a link to it from the developer's guide.
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
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.
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.
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.
dojo.require("dojo.event.*")is no longer supported.
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