Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,550 changes: 989 additions & 561 deletions package-lock.json

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@
},
"devDependencies": {
"@types/node": "^18.19.50",
"@typescript-eslint/eslint-plugin": "~7.0.2",
"@typescript-eslint/parser": "~7.0.2",
"eslint": "~8.56.0",
"@typescript-eslint/eslint-plugin": "~7.18.0",
"@typescript-eslint/parser": "~7.18.0",
"eslint": "~8.57.1",
"eslint-config-prettier": "~9.1.0",
"eslint-plugin-import": "~2.29.1",
"eslint-plugin-prettier": "~5.1.3",
"prettier": "~3.1.1",
"eslint-plugin-import": "~2.31.0",
"eslint-plugin-prettier": "~5.2.1",
"prettier": "~3.4.2",
"typescript": "~5.7.2"
}
}
2 changes: 1 addition & 1 deletion packages/core/src/serialization/ModelXmlSerializer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export class ModelXmlSerializer {

export(options?: ModelExportOptions): string {
const encodedNode = new Codec().encode(this.dataModel);
return options?.pretty ?? true ? getPrettyXml(encodedNode) : getXml(encodedNode!);
return (options?.pretty ?? true) ? getPrettyXml(encodedNode) : getXml(encodedNode!);
}

/**
Expand Down
6 changes: 3 additions & 3 deletions packages/core/src/view/GraphView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1305,7 +1305,7 @@ export class GraphView extends EventSource {
target: CellState | null = null
): EdgeStyleFunction | null {
let edgeStyle = this.isLoopStyleEnabled(edge, points, source, target)
? edge.style.loopStyle ?? this.graph.defaultLoopStyle
? (edge.style.loopStyle ?? this.graph.defaultLoopStyle)
: !(edge.style.noEdgeStyle ?? false)
? edge.style.edgeStyle
: null;
Expand Down Expand Up @@ -1515,15 +1515,15 @@ export class GraphView extends EventSource {
* Returns the x-coordinate of the center point for automatic routing.
*/
getRoutingCenterX(state: CellState): number {
const f = state.style ? state.style.routingCenterX ?? 0 : 0;
const f = state.style ? (state.style.routingCenterX ?? 0) : 0;
return state.getCenterX() + f * state.width;
}

/**
* Returns the y-coordinate of the center point for automatic routing.
*/
getRoutingCenterY(state: CellState): number {
const f = state.style ? state.style.routingCenterY ?? 0 : 0;
const f = state.style ? (state.style.routingCenterY ?? 0) : 0;
return state.getCenterY() + f * state.height;
}

Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/view/cell/CellRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1152,7 +1152,7 @@ class CellRenderer {
const bounds = this.getControlBounds(state, image.width, image.height);

const r = this.legacyControlPosition
? state.style.rotation ?? 0
? (state.style.rotation ?? 0)
: state.shape!.getTextRotation();
const s = state.view.scale;

Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/view/geometry/Shape.ts
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ class Shape {
const sw =
this.stencil && this.stencil.strokeWidthValue !== 'inherit'
? Number(this.stencil.strokeWidthValue)
: this.strokeWidth ?? 0;
: (this.strokeWidth ?? 0);

return mod(Math.max(1, Math.round(sw * this.scale)), 2) === 1 ? 0.5 : 0;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/view/handler/ConstraintHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ class ConstraintHandler {
this.constraints =
state && !this.isStateIgnored(state, source) && state.cell.isConnectable()
? this.isEnabled()
? this.graph.getAllConnectionConstraints(state, source) ?? []
? (this.graph.getAllConnectionConstraints(state, source) ?? [])
: []
: null;

Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/view/mixins/CellsMixin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ export const CellsMixin: PartialType = {

if (cells.length > 0) {
const style = this.getCurrentCellStyle(cells[0]);
value = style[key] ?? defaultValue ? false : true;
value = !(style[key] ?? defaultValue);
this.setCellStyles(key, value, cells);
}

Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/view/mixins/TooltipMixin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export const TooltipMixin: PartialType = {
state.overlays.visit((id: string, shape: Shape) => {
// LATER: Exit loop if tip is not null
if (!tip && (node === shape.node || node.parentNode === shape.node)) {
tip = shape.overlay ? shape.overlay.toString() ?? null : null;
tip = shape.overlay ? (shape.overlay.toString() ?? null) : null;
}
});
}
Expand Down