Skip to content

Releases: clientIO/joint

Release v3.4.3

24 Sep 13:46
28fbf71
Compare
Choose a tag to compare

CHANGELOG

  • Add List Demo (element with a vertical list of items) (a951713)
screenshot

image

  • Whitelist files for NPM publish (92e63d0)
  • Various TypeScript improvements (288cb36, dc44d6b, 19cf86a)
  • dia.Paper - skip update of connected links when isolate flag used (ffcf62e)
  • dia.LinkView - optimize connector only update (6ddd276)
  • dia.Cell - support preinitilize() lifecycle method (3bdaa8f)
  • connectors.jumpover - prevent unnecessary route recalculations (6ddd276)

Release v3.4.2

06 Sep 18:34
f42a9bf
Compare
Choose a tag to compare

CHANGELOG

  • dia.CellView - update typings for ES6 class extension (32660d1)
  • dia.Cell - fix toJSON() when defaults() is defined as a method (3bbc440)
  • util - prevent prototype pollution in setByPath() (e5bf89e)
  • Vectorizer - fix multi-line text line heights when 100% of the line is annotated (b14d173)

Release v3.4.1

18 Aug 14:15
4244d7a
Compare
Choose a tag to compare

CHANGELOG

  • dia.ElementView - prevent unnecessary re-parenting after invalid un-embedding (3adb394)
  • dia.CellView - support calc() in transform attribute (1c704bd)
  • dia.CellView - allow presentationAttributes and initFlag to be defined as a function (0461ff6)
  • fix minor TypeScript issues (addcb65, 3deff52)
  • fix minor documentation issues (889f1d2, 032e16c)

Release v3.4.0

13 Jul 12:46
caa5a6d
Compare
Choose a tag to compare

CHANGELOG

screenshot

image

screenshot

image

  • Add TypeScript shape definition tutorial (c326f1c)
  • Add Tree-Shake Demo (15019da)
  • Remove polyfill for XMLHttpRequest support of IE9 (d24f5e0)
  • Mark library as side-effect-free (15019da)
  • dia.Paper - add allowNegativeBottomRight option to fitToContent() (912c6a9, 7aee961)
  • dia.Paper - add routerNamespace and connectorNamespace options (15a6429)
  • dia.Paper - add validateUnembedding() option (4d71685, 2ff5749)
  • dia.Paper - add missing frontParentOnly option documentation (09e4131)
  • dia.Graph - fix order of cells in getElements() and getLinks() (5919541)
  • dia.Cell - add option to use DFS to index embedded cells in toFront() and toBack() (36290d3)
  • dia.attributes - add calc() function to be used in various SVG attributes
  • routers.manhattan - add isPointObstacle option (b05289f)
  • routers.manhattan - improve points comparison performance (49b54b9)
  • util.breakText - fix wrapping when the last word contains a hyphen (ff88231)
  • Geometry - split to files (15019da)
  • Geometry - add Rect methods to find a union of rectangles or points (4abeb46)

Release v3.3.1

08 Feb 10:53
68481bc
Compare
Choose a tag to compare

CHANGELOG

  • uglified files encode Unicode characters as ASCII
  • use polyfills from core-js
  • dia.Cell - remove() passes options to unembed() internally to maintain consistency

Release v3.3.0

15 Jan 22:54
fed63b3
Compare
Choose a tag to compare

CHANGELOG

  • Prevent prototype pollution - lodash v4.17.20, fix util.setByPath()
  • Prevent DoS - fix util.unsetByPath()
  • add Element Tools tutorial
  • highlighters - new API, add mask highlighter
screenshot

image

  • demo.ELK - add Eclipse Layout Kernel demo
screenshot

image

  • demo.Container - add collapse/expand container demo
screenshot

image

  • demo.Typescript - show class style shape definition
code
import { shapes, dia } from './vendor/joint';

export class MyShape extends dia.Element {

    defaults() {
        return {
            ...super.defaults,
            type: 'myNamespace.MyShape',
            size: { width: 100, height: 80 },
            attrs: {
                body: {
                    refCx: '50%',
                    refCy: '50%',
                    refRx: '50%',
                    refRy: '50%',
                    strokeWidth: 2,
                    stroke: '#333333',
                    fill: '#FFFFFF'
                },
                label: {
                    textVerticalAnchor: 'middle',
                    textAnchor: 'middle',
                    refX: '50%',
                    refY: '50%',
                    fontSize: 14,
                    fill: '#333333'
                }
            }
        }
    }

    markup = [{
        tagName: 'ellipse',
        selector: 'body'
    }, {
        tagName: 'text',
        selector: 'label'
    }]

    test(): void {
        console.log(`A prototype method test for ${this.get('type')}`);
    }

    static staticTest(i: number): void {
        console.log(`A static method test with an argument: ${i}`);
    }
}

Object.assign(shapes, {
    myNamespace: {
        MyShape
    }
});
  • demo.HTML - implement z-index sorting
  • dia.Paper - add snapLabels option
  • dia.Paper - restrictTranslate option defined as function returning a function
  • dia.Graph - fix hasActiveBatch()
  • dia.Element - prevent unnecessary rounding errors in resize()
  • dia.Element - add insertPort() to support inserting port at a given position
  • dia.Link - fix order of points in getPolyline()
  • dia.LinkView - prevent connection validation on magnets previously validated
  • dia.CellView - fix update order of nodes when ref in use
  • dia.ToolsView - enable adding tool to a view, which has not been rendered
  • util.breakText - fix height for a text with empty lines
  • highlighters.stroke - add useFirstSubpath option
  • routers.manhattan - fix scan directions order
  • connectors.jumpover - request updates after batch:stop
  • dia.attributes - add magnetSelector & containerSelector
  • dia.attributes - textWrap takes letter-spacing into account
  • Vectorizer - add createSVGStyle() and createCDATASection() static methods
  • Geometry - add getSubpaths() to Path
  • Geometry - add round() methods

Release v3.2.0

04 Jun 20:47
a27cf94
Compare
Choose a tag to compare

CHANGELOG

  • add Sequence Diagram demo
screenshot

image

  • add HTML Elements demo
screenshot

image

  • upgrade jQuery dependency (~3.5.0)
  • dia.Paper - add beforeRender and afterRender options, add hasScheduledUpdates(), trigger render:done in sync mode
  • dia.Paper - fix missing initial render:done event
  • dia.Paper - prevent the prototype options modification, persist functions passed as options
details
new joint.dia.Paper({
  // e.g. fixes `defaultConnector` option defined as a function
  defaultConnector: (sourcePoint, targetPoint, route) => {
     const polyline = new g.Polyline([sourcePoint, ...route, targetPoint]);
     return `M ${polyline.serialize()}`;
  }
});
  • dia.Paper - scaleContentToFit() option padding accepts an object
details
paper.scaleContentToFit({ padding: { top: 50, bottom: 10, horizontal: 10 }});
  • dia.Paper - fix isMounted argument of viewport() option
details
new joint.dia.Paper({
   viewport: function(view, isMounted) {
       if (isMounted) {
         // the view was already mounted
         // it's visible in the paper
       } else {
         // the view was just created or was detached by this function in the previous run
         // it's not visible in the paper (it's not in the DOM)
       }
      // return `true` to mount the view
      // return `false` to detach the view
   }
});
  • dia.Paper - dynamic link update priorities (fix for "link connected to other two links" update bug)
  • dia.Element - port removal runs in batch
  • dia.Element - add getGroupPorts()
  • dia.Element - prevent exception in getPointFromConnectedLink() when port does not exist
  • dia.LinkView - fix never ending batch for legacy link tools
  • dia.LinkView - add requestConnectionUpdate()
  • dia.LinkView - trigger link:snap:connect and link:snap:disconnect events
video

snap-paper-events

source code

  • dia.LinkView - prevent exception when labels and connection require update
  • dia.LinkView - measure snap distance for links from magnet's boundary
  • dia.LinkView - add getEndConnectionPoint()
  • mvc.View - add DETACHABLE property to ignore viewport matching, FLAG_INSERT & FLAG_REMOVE defined on per view basis
  • linkTools.Anchor: add resetAnchor option
  • linkTools.Segments: add stopPropagation option
  • connectionPoints.anchor - add align and alignOffset options
  • attributes.textWrap: add maxLineCount option
  • util.breakText - retain new line characters, add maxLineCount option
  • util.sanitizeHTML: sanitize attribute values with "data:" and "vbscript:"
  • Geometry - add parallel() to Line, add serialize() to Point and Line

Release v3.1.1

28 Oct 17:29
1620eb7
Compare
Choose a tag to compare

CHANGELOG

  • dia.CellView - prevent DOM exceptions when invalid attrs provided
  • dia.ToolView - prevent contextmenu event (uses paper.options.guard now)

Release v3.1.0

15 Oct 17:29
6c547fe
Compare
Choose a tag to compare

CHANGELOG

screenshot
  • add dia.elementTools: Button, Remove, Boundary
  • improve low-level performance for large graphs
  • fix ES5 dependencies
  • dia.Paper - validateMagnet() callback has evt argument
  • dia.Paper - ignore viewport when removing views, register unmounted views on render
  • dia.Graph - fix bfs() stop condition
  • dia.Element - make sure only elements are taken into account in fitEmbeds()
  • dia.LinkView - fix label rendering after multiple changes made to model
  • dia.LinkView - fix missing pointerup event for non-interactive labels
  • linkTools.Boundary - padding can be defined separately for each side
  • dia.ToolView - support reusable tools
  • connectors.jumpover - add radius option to make corners rounded
  • layout.DirectedGraph - remove unnecessary vertices
  • dia.attributes - add stubs option to connection attribute
screenshot
  • dia.attributes - add displayEmpty for text elements
  • Vectorizer - fix e2c() overflowing the stack in normalizePathData()
  • Geometry - add simplify() to Polyline (remove redundant points)

Release v3.0.4

02 Aug 16:25
9b9ae9e
Compare
Choose a tag to compare

CHANGELOG

  • package.json - add a browser key to point to dist (fix Webpack build in IE11)
  • dia.Paper - pass Backbone model options to view update (cell removal & z change)
  • dia.CellView - fix mouseleave event in async mode
  • linkTools.Vertices - fix vertexAdding option