npm jointjs 3.3.0
Release v3.3.0

latest releases: 4.0.0-alpha.1, 3.7.7, 3.7.6...
3 years ago

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

Don't miss a new jointjs release

NewReleases is sending notifications on new releases.