diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 913f06c..eb7c636 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -8,7 +8,7 @@ repos: language: python files: \.py$ - repo: https://github.com/astral-sh/ruff-pre-commit - rev: "v0.15.18" + rev: "v0.15.20" hooks: - id: ruff-format - repo: https://github.com/pre-commit/mirrors-prettier diff --git a/src/qmxgraph/page/api.js b/src/qmxgraph/page/api.js index 4593127..4673e7d 100644 --- a/src/qmxgraph/page/api.js +++ b/src/qmxgraph/page/api.js @@ -929,7 +929,7 @@ graphs.Api.prototype.setSelectedCells = function setSelectedCells(cellIds) { var cellsToSelect = []; var model = this._graphEditor.graph.getModel(); var cell = null; - for (var i = cellIds.length; i--; ) { + for (var i = cellIds.length; i--;) { cell = model.getCell(cellIds[i]); cellsToSelect.push(cell); } @@ -947,7 +947,7 @@ graphs.Api.prototype.getSelectedCells = function getSelectedCells() { var selectionModel = this._graphEditor.graph.getSelectionModel(); var cells = selectionModel.cells; var cellIds = []; - for (var i = cells.length; i--; ) { + for (var i = cells.length; i--;) { cellIds.push(cells[i].getId()); } return cellIds; @@ -1144,7 +1144,7 @@ graphs.Api.prototype.removePort = function removePort(vertexId, portName) { // This array will contain the port and edges connected on the parent vertex using the port. var cellsToRemove = [port]; var edges = graph.getEdges(parent); - for (var i = edges.length; i--; ) { + for (var i = edges.length; i--;) { var terminals = this._getMxEdgeTerminalsWithPorts(edges[i]); var source_terminal = terminals[0]; var target_terminal = terminals[1]; @@ -1297,7 +1297,7 @@ graphs.Api.prototype.registerSelectionChangedHandler = function registerSelectio var selectionHandler = function (source, event) { var selectedCells = source.cells; var selectedCellsIds = []; - for (var i = selectedCells.length; i--; ) { + for (var i = selectedCells.length; i--;) { selectedCellsIds.push(selectedCells[i].getId()); } handler(selectedCellsIds); diff --git a/src/qmxgraph/page/graphs.js b/src/qmxgraph/page/graphs.js index 06cd060..41283aa 100644 --- a/src/qmxgraph/page/graphs.js +++ b/src/qmxgraph/page/graphs.js @@ -448,7 +448,7 @@ graphs.createGraph = function createGraph(container, options, styles) { sender.__moved = []; - for (var c = cells.length; c--; ) { + for (var c = cells.length; c--;) { var cell = cells[c]; if (!cell.isEdge()) { var edges = sender.model.getEdges(cell);