CHANGELOG
- layout.DirectedGraph upgrades Dagre to v0.7.1
- layout.DirectedGraph introduces new option
resizeClusters
to reposition and resize cluster elements (parents of other elements) so that they embody their children - cells get
removeProp()
method for removing - possibly nested - properties - cells get new
addTo()
method as a syntactic sugar for adding them to joint.dia.Graph prop()
methods on cells now accepts 'undefined' as a value (instead of behaving like a getter)remove()
method now correctly propagates the options object to all listeners- routers.Manhattan router was improved to cope with hierarchical diagrams with embedded elements and does not consider ancestors of elements as obstacles
- routers.Manhattan router got smarter, finding better paths between source and target of a link
- new router for links
oneSide
that always routes links to/from a certain side specified - new
jumpover
connector type - Vectorizer adds
sample()
method for interpolating any SVG path with discrete equidistant points - Vectorizer adds
convertToPath()
,convertToPathData()
andfindIntersection()
functions - Vectorizer adds
findAnnotationsAtIndex()
,findAnnotationsBetweenIndexes()
andshiftAnnotations()
helper functions manipulating text annotations (seeVectorizer:text()
) - Vectorizer now sets
v-line
class to all text lines rendered withtext()
andv-empty-line
for lines that are empty - Vectorizer
find()
now returns an array of vectorizer elements, not the DOM NodeList - Vectorizer
V()
function now throws an error if invalid markup is given to it making wrong shape definitons visible to the programmer - Vectorizer
bbox()
now does not round values making calculations more precise - Geometry adds
rect:equals()
,rect:snapToGrid()
andrect:intersect()
functions - Geometry adds
clone()
method to all objects - new events in joint.dia.Paper
link:pointerdown
,link:pointerdown
,link:pointermove
,link:pointerup
,element:pointerdown
,element:pointermove
,element:pointerup
- new events in joint.dia.Paper
cell:contextmenu
andblank:contextmenu
- new
maxWidth
andmaxHeight
options in joint.dia.PaperfitToContent()
method - joint.dia.Paper adds
labelMove
option to theinteractive
object for enabling moving labels via UI - joint.dia.Paper
findViewByModel()
significantly improved performance - fixes in joint.dia.Paper async rendering
- new
restrictTranslate
option in joint.dia.Paper for restricting movement of elements - joint.dia.Paper introduces new
cellViewNamespace
option for declaring custom namespace for views (defaults to joint.shapes) - joint.dia.Paper
elementView
andlinkView
options can be now functions - joint.dia.Paper introduces new
defaultRouter
anddefaultConnector
options - joint.dia.Paper introduces new
linkPinning
option to disable creating links without source/target - joint.dia.Paper now ignores mouse events that are not relevant (events that do not target the internal SVG document or a cell)
- joint.dia.Paper
remove()
make a proper cleanup of all views - fixed using multiple joint.dia.Paper objects on the same page so that they don't share any options
- fixed normalization of touch events that now expose
stopPropagation()
andpreventDefault()
as all other events do - new method
findModelsUnderElement()
in joint.dia.Graph for finding elements below another element - joint.dia.Graph fixes the
fetch()
method - joint.dia.Graph introduces new
cellNamespace
option for declaring custom namespace for models (defaults tojoint.shapes
) - joint.dia.Graph adds new method
getCells()
- joint.dia.Graph
getNeighbors()
method improved and extended withdeep
option to better support hierarchical diagrams containing embedded elements - joint.dia.Link adds offset property on labels and implements dragging labels off the links
- joint.dia.Element adds
fitEmbeds()
method for resizing the element so that it fits all the embedded elements inside it - joint.dia.ElementView
getBBox()
now returns the rect object of Geometry library that directly exposes various math functions for rectangles - new
joint.util.getElementBBox()
function for getting a bounding box of both HTML and SVG elements - new
joint.util.normalizSides()
function - new
joint.util.sortElements()
function for sorting DOM elements - add an optional context parameter to
joint.util.nextFrame()
- new filters
joint.util.filter.outline
andjoint.util.filter.highlight
- special JointJS attributes
ref-x
,ref-y
,ref-width
andref-height
can be specified in percentages - joint.dia.Link routers and connector can be now specified as functions
- source code passed through JSCS checker, fixed coding style and indentation
- Lodash upgraded to the latest version v3.10.1
- Backbone upgraded to v1.2.1
- make JointJS compatible with Browserify, Webpack and RequireJS
- other fixes and improvements