diff --git a/ThreatDragonModels/test-reports.json b/ThreatDragonModels/test-reports.json index 9fe2894e7..787faf798 100644 --- a/ThreatDragonModels/test-reports.json +++ b/ThreatDragonModels/test-reports.json @@ -284,7 +284,7 @@ "stroke": "#333333", "strokeWidth": 1, "targetMarker": { - "name": "classic" + "name": "block" }, "strokeDasharray": null } @@ -323,7 +323,7 @@ "stroke": "#333333", "strokeWidth": 1, "targetMarker": { - "name": "classic" + "name": "block" }, "strokeDasharray": "5 2" } @@ -362,7 +362,7 @@ "stroke": "#333333", "strokeWidth": 1, "targetMarker": { - "name": "classic" + "name": "block" }, "strokeDasharray": null } @@ -401,7 +401,7 @@ "stroke": "#333333", "strokeWidth": 1, "targetMarker": { - "name": "classic" + "name": "block" }, "strokeDasharray": "5 2" } @@ -570,7 +570,7 @@ "stroke": "#333333", "strokeWidth": 1, "targetMarker": { - "name": "classic" + "name": "block" }, "strokeDasharray": null } @@ -795,7 +795,7 @@ "stroke": "#333333", "strokeWidth": 1, "targetMarker": { - "name": "classic" + "name": "block" }, "strokeDasharray": null } diff --git a/ThreatDragonModels/v2-threat-model.json b/ThreatDragonModels/v2-threat-model.json index 62f9d5890..585a4fd70 100644 --- a/ThreatDragonModels/v2-threat-model.json +++ b/ThreatDragonModels/v2-threat-model.json @@ -479,7 +479,7 @@ "stroke": "#333333", "strokeWidth": 1, "targetMarker": { - "name": "classic" + "name": "block" }, "strokeDasharray": null } @@ -542,7 +542,7 @@ "line": { "stroke": "red", "targetMarker": { - "name": "classic" + "name": "block" }, "strokeDasharray": null } @@ -605,7 +605,7 @@ "line": { "stroke": "red", "targetMarker": { - "name": "classic" + "name": "block" }, "strokeDasharray": null } @@ -668,7 +668,7 @@ "line": { "stroke": "red", "targetMarker": { - "name": "classic" + "name": "block" }, "strokeDasharray": null } @@ -784,7 +784,7 @@ "stroke": "#333333", "strokeWidth": 1, "targetMarker": { - "name": "classic" + "name": "block" }, "strokeDasharray": null } @@ -848,7 +848,7 @@ "stroke": "#333333", "strokeWidth": 1, "targetMarker": { - "name": "classic" + "name": "block" }, "strokeDasharray": "2 2" } @@ -901,7 +901,7 @@ "stroke": "#333333", "strokeWidth": 1, "targetMarker": { - "name": "classic" + "name": "block" }, "strokeDasharray": "2 2" } @@ -954,7 +954,7 @@ "stroke": "#333333", "strokeWidth": 1, "targetMarker": { - "name": "classic" + "name": "block" }, "strokeDasharray": null } @@ -1007,7 +1007,7 @@ "stroke": "#333333", "strokeWidth": 1, "targetMarker": { - "name": "classic" + "name": "block" }, "strokeDasharray": null } @@ -1060,7 +1060,7 @@ "stroke": "#333333", "strokeWidth": 1, "targetMarker": { - "name": "classic" + "name": "block" }, "strokeDasharray": null } diff --git a/td.vue/src/service/demo/v2-threat-model.js b/td.vue/src/service/demo/v2-threat-model.js index 498c9d070..8fd7a1847 100644 --- a/td.vue/src/service/demo/v2-threat-model.js +++ b/td.vue/src/service/demo/v2-threat-model.js @@ -479,7 +479,7 @@ export default { 'stroke': '#333333', 'strokeWidth': 1, 'targetMarker': { - 'name': 'classic' + 'name': 'block' }, 'strokeDasharray': null } @@ -542,7 +542,7 @@ export default { 'line': { 'stroke': 'red', 'targetMarker': { - 'name': 'classic' + 'name': 'block' }, 'strokeDasharray': null } @@ -605,7 +605,7 @@ export default { 'line': { 'stroke': 'red', 'targetMarker': { - 'name': 'classic' + 'name': 'block' }, 'strokeDasharray': null } @@ -668,7 +668,7 @@ export default { 'line': { 'stroke': 'red', 'targetMarker': { - 'name': 'classic' + 'name': 'block' }, 'strokeDasharray': null } @@ -784,7 +784,7 @@ export default { 'stroke': '#333333', 'strokeWidth': 1, 'targetMarker': { - 'name': 'classic' + 'name': 'block' }, 'strokeDasharray': null } @@ -848,7 +848,7 @@ export default { 'stroke': '#333333', 'strokeWidth': 1, 'targetMarker': { - 'name': 'classic' + 'name': 'block' }, 'strokeDasharray': '2 2' } @@ -901,7 +901,7 @@ export default { 'stroke': '#333333', 'strokeWidth': 1, 'targetMarker': { - 'name': 'classic' + 'name': 'block' }, 'strokeDasharray': '2 2' } @@ -954,7 +954,7 @@ export default { 'stroke': '#333333', 'strokeWidth': 1, 'targetMarker': { - 'name': 'classic' + 'name': 'block' }, 'strokeDasharray': null } @@ -1007,7 +1007,7 @@ export default { 'stroke': '#333333', 'strokeWidth': 1, 'targetMarker': { - 'name': 'classic' + 'name': 'block' }, 'strokeDasharray': null } @@ -1060,7 +1060,7 @@ export default { 'stroke': '#333333', 'strokeWidth': 1, 'targetMarker': { - 'name': 'classic' + 'name': 'block' }, 'strokeDasharray': null } diff --git a/td.vue/src/service/x6/graph/data-changed.js b/td.vue/src/service/x6/graph/data-changed.js index e1a2b0b3f..51d1f935f 100644 --- a/td.vue/src/service/x6/graph/data-changed.js +++ b/td.vue/src/service/x6/graph/data-changed.js @@ -42,7 +42,8 @@ const edgeUpdater = (edge, color, dash, strokeWidth) => { edge.setAttrByPath('line/stroke', color); edge.setAttrByPath('line/strokeWidth', strokeWidth); edge.setAttrByPath('line/strokeDasharray', dash); - edge.setAttrByPath('line/targetMarker/name', 'classic'); + edge.setAttrByPath('line/targetMarker/name', 'block'); + edge.setAttrByPath('line/sourceMarker/name', ''); }; const updateStyleAttrs = (cell) => { diff --git a/td.vue/src/service/x6/shapes/flow-stencil.js b/td.vue/src/service/x6/shapes/flow-stencil.js index 64c2c272b..0a368ffd2 100644 --- a/td.vue/src/service/x6/shapes/flow-stencil.js +++ b/td.vue/src/service/x6/shapes/flow-stencil.js @@ -24,7 +24,7 @@ export const FlowStencil = Shape.Empty.define({ ], attrs: { boundary: { - strokeWidth: 1, + strokeWidth: 1.5, stroke: '#333333', fill: 'transparent', refD: 'M 30 20 C 70 20 70 100 110 100' @@ -33,6 +33,10 @@ export const FlowStencil = Shape.Empty.define({ text: tc('threatmodel.shapes.flowStencil'), fill: '#333', textVerticalAnchor: 'middle' + }, + line: { + targetMarker: 'block', + sourceMarker: '' } }, data: defaultProperties.flow diff --git a/td.vue/src/service/x6/shapes/flow.js b/td.vue/src/service/x6/shapes/flow.js index a9e0bce35..4548a40ad 100644 --- a/td.vue/src/service/x6/shapes/flow.js +++ b/td.vue/src/service/x6/shapes/flow.js @@ -12,7 +12,7 @@ export const Flow = Shape.Edge.define({ zIndex: 10, attrs: { line: { - strokeWidth: 3, + strokeWidth: 1.5, sourceMarker: null, targetMarker: null } diff --git a/td.vue/tests/e2e/fixtures/v2-model.json b/td.vue/tests/e2e/fixtures/v2-model.json index 9b6247f56..3e697dfd0 100644 --- a/td.vue/tests/e2e/fixtures/v2-model.json +++ b/td.vue/tests/e2e/fixtures/v2-model.json @@ -134,7 +134,7 @@ "stroke": "#333333", "strokeWidth": 1, "targetMarker": { - "name": "classic" + "name": "block" }, "strokeDasharray": null } @@ -175,7 +175,7 @@ "line": { "stroke": "red", "targetMarker": { - "name": "classic" + "name": "block" }, "strokeDasharray": null } diff --git a/td.vue/tests/unit/service/x6/graph/data-changed.spec.js b/td.vue/tests/unit/service/x6/graph/data-changed.spec.js index 65818f76f..8a6291634 100644 --- a/td.vue/tests/unit/service/x6/graph/data-changed.spec.js +++ b/td.vue/tests/unit/service/x6/graph/data-changed.spec.js @@ -39,7 +39,7 @@ describe('service/x6/graph/data-changed.js', () => { }); it('calls updateStyle', () => { - expect(cell.updateStyle).toHaveBeenCalledWith('red', '5 2', 3.0); + expect(cell.updateStyle).toHaveBeenCalledWith('red', '4 3', 2.5); }); }); @@ -57,7 +57,7 @@ describe('service/x6/graph/data-changed.js', () => { }); it('calls updateStyle', () => { - expect(cell.updateStyle).toHaveBeenCalledWith('#333333', null, 1.0); + expect(cell.updateStyle).toHaveBeenCalledWith('#333333', null, 1.5); }); }); @@ -72,7 +72,7 @@ describe('service/x6/graph/data-changed.js', () => { }); it('calls updateStyle', () => { - expect(cell.updateStyle).toHaveBeenCalledWith('#333333', null, 1.0); + expect(cell.updateStyle).toHaveBeenCalledWith('#333333', null, 1.5); }); }); @@ -139,9 +139,9 @@ describe('service/x6/graph/data-changed.js', () => { .toHaveBeenCalledWith('line/strokeDasharray', null); }); - it('sets the target marker to classic', () => { + it('sets the target marker to block', () => { expect(cell.setAttrByPath) - .toHaveBeenCalledWith('line/targetMarker/name', 'classic'); + .toHaveBeenCalledWith('line/targetMarker/name', 'block'); }); }); }); diff --git a/td.vue/tests/unit/service/x6/graph/graph.spec.js b/td.vue/tests/unit/service/x6/graph/graph.spec.js index ecb608610..21e2bdc73 100644 --- a/td.vue/tests/unit/service/x6/graph/graph.spec.js +++ b/td.vue/tests/unit/service/x6/graph/graph.spec.js @@ -149,7 +149,7 @@ describe('service/x6/graph/graph.js', () => { orthogonal: true, restricted: false, autoScroll: true, - preserveAspectRatio: true, + preserveAspectRatio: false, allowReverse: true }); });