Skip to content

Commit

Permalink
Add trailingComma: "none" to prettier config due phathomjs no suppo…
Browse files Browse the repository at this point in the history
…rting newer systax
  • Loading branch information
prusse-martin committed Sep 20, 2022
1 parent 9986443 commit a09ed22
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 36 deletions.
1 change: 1 addition & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
tabWidth: 4
trailingComma: "none"
printWidth: 100
52 changes: 26 additions & 26 deletions src/qmxgraph/page/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ graphs.Api.prototype.insertVertex = function insertVertex(
style,
tags,
id,
adjustXYCcoordinates,
adjustXYCcoordinates
) {
"use strict";

Expand Down Expand Up @@ -118,7 +118,7 @@ graphs.Api.prototype.insertPort = function insertPort(
height,
label,
style,
tags,
tags
) {
"use strict";

Expand Down Expand Up @@ -171,7 +171,7 @@ graphs.Api.prototype.updatePort = function updatePort(
height,
label,
style,
tags,
tags
) {
"use strict";

Expand Down Expand Up @@ -253,7 +253,7 @@ graphs.Api.prototype.insertEdge = function insertEdge(
tags,
sourcePortName,
targetPortName,
id,
id
) {
"use strict";

Expand Down Expand Up @@ -308,7 +308,7 @@ graphs.Api.prototype.insertDecoration = function insertDecoration(
label,
style,
tags,
id,
id
) {
"use strict";

Expand All @@ -318,7 +318,7 @@ graphs.Api.prototype.insertDecoration = function insertDecoration(

if (edge === null) {
throw Error(
"Could not find an edge at position and can only add a decoration over an edge.",
"Could not find an edge at position and can only add a decoration over an edge."
);
}

Expand Down Expand Up @@ -346,7 +346,7 @@ graphs.Api.prototype.insertDecoration = function insertDecoration(
* @returns {number} Position of the decoration in mxGraph coordinates (normalized between [-1, 1]).
*/
graphs.Api.prototype._mapDecorationPositionToMxGraph = function _mapDecorationPositionToMxGraph(
position,
position
) {
if (position < 0) {
position = 0;
Expand Down Expand Up @@ -381,7 +381,7 @@ graphs.Api.prototype.insertDecorationOnEdge = function insertDecorationOnEdge(
label,
style,
tags,
id,
id
) {
"use strict";

Expand Down Expand Up @@ -416,7 +416,7 @@ graphs.Api.prototype._insertDecorationOnEdge = function _insertDecorationOnEdge(
label,
style,
tags,
id,
id
) {
"use strict";

Expand Down Expand Up @@ -448,7 +448,7 @@ graphs.Api.prototype._insertDecorationOnEdge = function _insertDecorationOnEdge(
width,
height,
decorationStyle,
true,
true
);
decoration.geometry.offset = new mxPoint(-width / 2, -height / 2);
decoration.connectable = false;
Expand Down Expand Up @@ -490,7 +490,7 @@ graphs.Api.prototype.insertTable = function insertTable(
tags,
style,
parentId,
id,
id
) {
"use strict";

Expand Down Expand Up @@ -534,7 +534,7 @@ graphs.Api.prototype.insertTable = function insertTable(
0,
0,
tableStyle,
isRelative,
isRelative
);
table.connectable = false;

Expand Down Expand Up @@ -683,7 +683,7 @@ graphs.Api.prototype._getBoundsFromMxCell = function _getBoundsFromMxCell(cell)
y: y,
width: geometry.width,
height: geometry.height,
parent_anchor_position: parent_anchor_position,
parent_anchor_position: parent_anchor_position
};
};

Expand Down Expand Up @@ -1287,7 +1287,7 @@ graphs.Api.prototype.registerBoundsChangedHandler = function registerBoundsChang
* that are selected as only argument.
*/
graphs.Api.prototype.registerSelectionChangedHandler = function registerSelectionChangedHandler(
handler,
handler
) {
"use strict";

Expand All @@ -1312,7 +1312,7 @@ graphs.Api.prototype.registerSelectionChangedHandler = function registerSelectio
* id of the old terminal.
*/
graphs.Api.prototype.registerTerminalChangedHandler = function registerTerminalChangedHandler(
handler,
handler
) {
"use strict";

Expand All @@ -1330,7 +1330,7 @@ graphs.Api.prototype.registerTerminalChangedHandler = function registerTerminalC
change.cell.getId(),
change.source ? "source" : "target",
change.terminal.getId(),
change.previous.getId(),
change.previous.getId()
);
}
}
Expand Down Expand Up @@ -1401,20 +1401,20 @@ graphs.Api.prototype.registerTerminalWithPortChangedHandler =
var newPortName = getPortNameFromStyle(
stylesheet,
eventData.newStyle,
eventData.source,
eventData.source
);
var previousPortName = getPortNameFromStyle(
stylesheet,
eventData.previousStyle,
eventData.source,
eventData.source
);
handler(
eventTargetId,
eventData.source,
eventData.newTerminalId,
newPortName,
eventData.previousTerminalId,
previousPortName,
previousPortName
);
}
}
Expand Down Expand Up @@ -1757,7 +1757,7 @@ graphs.Api.prototype.setEdgeTerminal = function setEdgeTerminal(
cellId,
terminalType,
newTerminalCellId,
portName,
portName
) {
"use strict";
var isSource = true;
Expand Down Expand Up @@ -1817,10 +1817,10 @@ graphs.Api.prototype._getMxEdgeTerminalsWithPorts = function _getMxEdgeTerminals

if (!this._qmxgraphSourcePortNameExtractionRegex) {
this._qmxgraphTargetPortNameExtractionRegex = new RegExp(
"(?:^|;)targetPort=" + mxCell._PORT_ID_PREFIX + "\\d+-([^;$]+)(?:;|$)",
"(?:^|;)targetPort=" + mxCell._PORT_ID_PREFIX + "\\d+-([^;$]+)(?:;|$)"
);
this._qmxgraphSourcePortNameExtractionRegex = new RegExp(
"(?:^|;)sourcePort=" + mxCell._PORT_ID_PREFIX + "\\d+-([^;$]+)(?:;|$)",
"(?:^|;)sourcePort=" + mxCell._PORT_ID_PREFIX + "\\d+-([^;$]+)(?:;|$)"
);
}

Expand All @@ -1839,7 +1839,7 @@ graphs.Api.prototype._getMxEdgeTerminalsWithPorts = function _getMxEdgeTerminals

return [
[sourceId, sourcePortName],
[targetId, targetPortName],
[targetId, targetPortName]
];
};

Expand Down Expand Up @@ -1892,12 +1892,12 @@ graphs.Api.prototype._getMxEdgeTerminalPoints = function _getMxEdgeTerminalPoint
var sourcePort = view.getTerminalPort(
view.getState(edge),
view.getState(edge.getTerminal(true)),
true,
true
);
var targetPort = view.getTerminalPort(
view.getState(edge),
view.getState(edge.getTerminal(false)),
false,
false
);

var edgeGeo = this.getGeometry(edgeId);
Expand Down Expand Up @@ -1928,7 +1928,7 @@ graphs.Api.prototype.getEdgeTerminalPoints = function getEdgeTerminalPoints(edge
var terminal_points = this._getMxEdgeTerminalPoints(edge);
return [
[terminal_points[0].x, terminal_points[0].y],
[terminal_points[1].x, terminal_points[1].y],
[terminal_points[1].x, terminal_points[1].y]
];
};

Expand Down
12 changes: 6 additions & 6 deletions src/qmxgraph/page/graphs.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,8 @@ graphs.createGraph = function createGraph(container, options, styles) {
"old",
old,
"event",
evt,
),
evt
)
);
} finally {
this.model.endUpdate();
Expand Down Expand Up @@ -364,7 +364,7 @@ graphs.createGraph = function createGraph(container, options, styles) {
graph.connectionHandler.connectImage = new mxImage(
options["connection_image"][0],
options["connection_image"][1],
options["connection_image"][2],
options["connection_image"][2]
);
}

Expand All @@ -373,7 +373,7 @@ graphs.createGraph = function createGraph(container, options, styles) {
mxConstraintHandler.prototype.pointImage = new mxImage(
options["port_image"][0],
options["port_image"][1],
options["port_image"][2],
options["port_image"][2]
);
}

Expand Down Expand Up @@ -496,7 +496,7 @@ graphs.createGraph = function createGraph(container, options, styles) {
var markerStyle = graphs.utils.obtainDecorationStyle(
graph,
edge,
marker.getStyle(),
marker.getStyle()
);
graph.model.setStyle(marker, markerStyle);
}
Expand Down Expand Up @@ -532,7 +532,7 @@ graphs.createGraph = function createGraph(container, options, styles) {
console.log(event.clientX, event.clientY);
}
},
false,
false
);

return editor;
Expand Down
4 changes: 2 additions & 2 deletions src/qmxgraph/page/mxextensions.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
var effectiveLabelRotatable = mxUtils.getValue(
this.style,
mxConstants.STYLE_LABEL_ROTATABLE,
1,
1
);
if (effectiveLabelRotatable == 0) {
// jshint ignore:line
Expand All @@ -56,7 +56,7 @@
var effectiveLabelRotatable = mxUtils.getValue(
this.style,
mxConstants.STYLE_LABEL_ROTATABLE,
1,
1
);
if (effectiveLabelRotatable == 0) {
// jshint ignore:line
Expand Down
4 changes: 2 additions & 2 deletions src/qmxgraph/page/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ graphs.utils.createTableElement = function createTableElement(contents, title) {
var td_defaults = [
["colspan", 1],
["rowspan", 1],
["style", null],
["style", null]
];
var result = "<td";
for (var i = 0; i < td_defaults.length; ++i) {
Expand Down Expand Up @@ -321,7 +321,7 @@ graphs.utils.escapeHtml = function escapeHtml(text) {
"<": "&lt;",
">": "&gt;",
'"': "&quot;",
"'": "&#039;",
"'": "&#039;"
};
return String(text).replace(/[&<>"']/g, function (m) {
return map[m];
Expand Down

0 comments on commit a09ed22

Please sign in to comment.