diff --git a/packages/joint-core/demo/archive/fsa/src/fsa.js b/packages/joint-core/demo/archive/fsa/src/fsa.js index d4176990d..edd1cd854 100644 --- a/packages/joint-core/demo/archive/fsa/src/fsa.js +++ b/packages/joint-core/demo/archive/fsa/src/fsa.js @@ -60,7 +60,6 @@ const EndState = joint.dia.Element.define('fsa.EndState', { const Arrow = joint.dia.Link.define('fsa.Arrow', { attrs: { '.marker-target': { d: 'M 10 0 L 0 5 L 10 10 z' }}, - smooth: true }); const shapes = { diff --git a/packages/joint-core/demo/links/src/links.js b/packages/joint-core/demo/links/src/links.js index b7bcad233..226052bd0 100644 --- a/packages/joint-core/demo/links/src/links.js +++ b/packages/joint-core/demo/links/src/links.js @@ -123,7 +123,7 @@ var link5 = new joint.shapes.standard.Link({ source: { x: 440, y: 100 }, target: { x: 740, y: 100 }, vertices: [{ x: 400, y: 140 }, { x: 550, y: 100 }, { x: 600, y: 140 }], - smooth: true, + connector: { name: 'smooth' }, attrs: { line: { stroke: '#7c68fc', @@ -242,7 +242,7 @@ var link8 = new joint.shapes.standard.ShadowLink({ source: { x: 10, y: 280 }, target: { x: 440, y: 280 }, vertices: [{ x: 150, y: 350 }, { x: 300, y: 280 }], - smooth: true, + connector: { name: 'smooth' }, markup: [{ tagName: 'path', selector: 'shadow', diff --git a/packages/joint-core/docs/demo/layout/DirectedGraph/js/index.js b/packages/joint-core/docs/demo/layout/DirectedGraph/js/index.js index 4ceb4334f..75972a289 100644 --- a/packages/joint-core/docs/demo/layout/DirectedGraph/js/index.js +++ b/packages/joint-core/docs/demo/layout/DirectedGraph/js/index.js @@ -61,7 +61,7 @@ return new joint.shapes.standard.Link({ source: { id: parentElementLabel }, target: { id: childElementLabel }, - smooth: true, + connector: { name: 'smooth' }, attrs: { line: { targetMarker: { diff --git a/packages/joint-core/docs/src/joint/api/connectors/smooth.html b/packages/joint-core/docs/src/joint/api/connectors/smooth.html index 5c9b7fa4e..9aabd06e4 100644 --- a/packages/joint-core/docs/src/joint/api/connectors/smooth.html +++ b/packages/joint-core/docs/src/joint/api/connectors/smooth.html @@ -3,8 +3,3 @@
Example:
link.connector('smooth');
-
-(Deprecated) For the purposes of backwards compatibility, the 'smooth'
connector may also be enabled by setting the link.smooth
property to true
.
// deprecated
-link.set('smooth', true)
diff --git a/packages/joint-core/docs/src/joint/api/dia/Link/events.html b/packages/joint-core/docs/src/joint/api/dia/Link/events.html
index cc8c80fbc..91012e213 100644
--- a/packages/joint-core/docs/src/joint/api/dia/Link/events.html
+++ b/packages/joint-core/docs/src/joint/api/dia/Link/events.html
@@ -3,8 +3,8 @@
change:source
- triggered when the link changes its sourcechange:target
- triggered when the link changes its targetchange:attrs
- triggered when the link changes its attributeschange:smooth
- (deprecated) triggered when the link toggled interpolation change:manhattan
- (deprecated) triggered when the link toggled orthogonal routingchange:connector
- triggered when the link changes its connector change:router
- triggered when the link changes its routerchange:vertices
- triggered when the link changes its vertices array change:z
- triggered when the link is moved in the z-level (toFront and toBack)transition:start
- triggered when a transition starts.link.connector()
Return a shallow copy of the connector
property of the link.
For backwards compatibility, if there is no connector, the function also checks whether the legacy smooth
property is set on the link and returns { name: smooth }
if it is.
link.connector(connector [, opt])
Set the connector
of the link.
link.router()
Return a shallow copy of the router
property of the link.
For backwards compatibility, if there is no router, the function also checks whether the legacy manhattan
property is set on the link and returns { name: orthogonal }
if it is.
link.router(router [, opt])
Set the router
of the link.
link.router('orthogonal', {
padding: 10
});
-
-(Deprecated) For the purposes of backwards compatibility, the 'orthogonal'
router can also be enabled by setting the link.manhattan
property to true
. Note that the meaning of manhattan
in JointJS has changed over time.
// deprecated
-link.set('manhattan', true);
diff --git a/packages/joint-core/src/connectors/jumpover.mjs b/packages/joint-core/src/connectors/jumpover.mjs
index 9935a893c..9fea49a5a 100644
--- a/packages/joint-core/src/connectors/jumpover.mjs
+++ b/packages/joint-core/src/connectors/jumpover.mjs
@@ -428,7 +428,7 @@ export const jumpover = function(sourcePoint, targetPoint, route, opt) { // esli
if (overlapIndex > -1 && thisLine.containsPoint(linkLinesToTest[overlapIndex].end)) {
// Remove the next segment because there will never be a jump
linkLinesToTest.splice(overlapIndex + 1, 1);
- }
+ }
const lineIntersections = findLineIntersections(thisLine, linkLinesToTest);
res.push.apply(res, lineIntersections);
}
diff --git a/packages/joint-core/src/dia/Link.mjs b/packages/joint-core/src/dia/Link.mjs
index a2dcfb85e..74d61721f 100644
--- a/packages/joint-core/src/dia/Link.mjs
+++ b/packages/joint-core/src/dia/Link.mjs
@@ -215,7 +215,6 @@ export const Link = Cell.extend({
if (name === undefined) {
var router = this.get('router');
if (!router) {
- if (this.get('manhattan')) return { name: 'orthogonal' }; // backwards compatibility
return null;
}
if (typeof router === 'object') return clone(router);
@@ -236,7 +235,6 @@ export const Link = Cell.extend({
if (name === undefined) {
var connector = this.get('connector');
if (!connector) {
- if (this.get('smooth')) return { name: 'smooth' }; // backwards compatibility
return null;
}
if (typeof connector === 'object') return clone(connector);
diff --git a/packages/joint-core/src/dia/LinkView.mjs b/packages/joint-core/src/dia/LinkView.mjs
index 120767f85..ecdbc5437 100644
--- a/packages/joint-core/src/dia/LinkView.mjs
+++ b/packages/joint-core/src/dia/LinkView.mjs
@@ -80,8 +80,6 @@ export const LinkView = CellView.extend({
attrs: [Flags.UPDATE],
router: [Flags.UPDATE],
connector: [Flags.CONNECTOR],
- smooth: [Flags.UPDATE],
- manhattan: [Flags.UPDATE],
toolMarkup: [Flags.LEGACY_TOOLS],
labels: [Flags.LABELS],
labelMarkup: [Flags.LABELS],
diff --git a/packages/joint-core/test/jointjs/routers.js b/packages/joint-core/test/jointjs/routers.js
index b95d69cdb..d7c37cbbe 100644
--- a/packages/joint-core/test/jointjs/routers.js
+++ b/packages/joint-core/test/jointjs/routers.js
@@ -87,7 +87,7 @@ QUnit.module('routers', function(hooks) {
var l1 = new joint.dia.Link({
source: { id: r1.id },
target: { id: r2.id },
- manhattan: true,
+ router: { name: 'orthogonal' },
vertices: [{ x: 150, y: 200 }]
});
@@ -106,7 +106,7 @@ QUnit.module('routers', function(hooks) {
var l2 = new joint.dia.Link({
source: { id: r3.id },
target: { id: r4.id },
- manhattan: true
+ router: { name: 'orthogonal' },
});
this.graph.addCells([r3, r4, l2]);
@@ -124,7 +124,7 @@ QUnit.module('routers', function(hooks) {
var l3 = new joint.dia.Link({
source: { id: r5.id },
target: { id: r6.id },
- manhattan: true,
+ router: { name: 'orthogonal' },
vertices: [{ x: 150, y: 200 }]
});
diff --git a/packages/joint-core/types/joint.d.ts b/packages/joint-core/types/joint.d.ts
index b5ef31935..b235e419c 100644
--- a/packages/joint-core/types/joint.d.ts
+++ b/packages/joint-core/types/joint.d.ts
@@ -582,9 +582,7 @@ export namespace dia {
target?: EndJSON;
labels?: Label[];
vertices?: Point[];
- manhattan?: boolean;
router?: routers.Router | routers.RouterJSON;
- smooth?: boolean;
connector?: connectors.Connector | connectors.ConnectorJSON;
}