Skip to content

Commit

Permalink
Rename source and sink to empty set
Browse files Browse the repository at this point in the history
  • Loading branch information
msalihaltun committed Jun 1, 2021
1 parent 180ad62 commit 522b431
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
20 changes: 10 additions & 10 deletions chise.js

Large diffs are not rendered by default.

18 changes: 9 additions & 9 deletions src/utilities/element-utilities-extender-factory.js
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ module.exports = function () {

elementUtilities.createTranslationReaction = function(mRnaName, proteinName, processPosition, edgeLength) {
const defaultProcessProperties = elementUtilities.getDefaultProperties("translation");
const defaultSourceAndSinkProperties = elementUtilities.getDefaultProperties("source and sink");
const defaultSourceAndSinkProperties = elementUtilities.getDefaultProperties("empty set");
const defaultNucleicAcidFeatureProperties = elementUtilities.getDefaultProperties("nucleic acid feature");
const defaultMacromoleculeProperties = elementUtilities.getDefaultProperties("macromolecule");
const macromoleculeWidth = defaultMacromoleculeProperties.width || 50;
Expand All @@ -411,7 +411,7 @@ module.exports = function () {

const xPosOfSourceAndSinkNode = processPosition.x - edgeLength - processWidth / 2 - sourceAndSinkWidth / 2;
const yPosOfSourceAndSinkNode = processPosition.y;
var sourceAndSinkNode = elementUtilities.addNode(xPosOfSourceAndSinkNode, yPosOfSourceAndSinkNode, {class: 'source and sink', language: 'PD'});
var sourceAndSinkNode = elementUtilities.addNode(xPosOfSourceAndSinkNode, yPosOfSourceAndSinkNode, {class: 'empty set', language: 'PD'});
sourceAndSinkNode.data('justAdded', true);

var consumptionEdge = elementUtilities.addEdge(sourceAndSinkNode.id(), processNode.id(), {class: 'consumption', language: 'PD'});
Expand Down Expand Up @@ -460,7 +460,7 @@ module.exports = function () {

elementUtilities.createTranscriptionReaction = function(geneName, mRnaName, processPosition, edgeLength) {
const defaultProcessProperties = elementUtilities.getDefaultProperties("transcription");
const defaultSourceAndSinkProperties = elementUtilities.getDefaultProperties("source and sink");
const defaultSourceAndSinkProperties = elementUtilities.getDefaultProperties("empty set");
const defaultNucleicAcidFeatureProperties = elementUtilities.getDefaultProperties("nucleic acid feature");
const sourceAndSinkWidth = defaultSourceAndSinkProperties.width || 50;
const nucleicAcidFeatureHeight = defaultNucleicAcidFeatureProperties.height || 50;
Expand All @@ -481,7 +481,7 @@ module.exports = function () {

const xPosOfSourceAndSinkNode = processPosition.x - edgeLength - processWidth / 2 - sourceAndSinkWidth / 2;
const yPosOfSourceAndSinkNode = processPosition.y;
var sourceAndSinkNode = elementUtilities.addNode(xPosOfSourceAndSinkNode, yPosOfSourceAndSinkNode, {class: 'source and sink', language: 'PD'});
var sourceAndSinkNode = elementUtilities.addNode(xPosOfSourceAndSinkNode, yPosOfSourceAndSinkNode, {class: 'empty set', language: 'PD'});
sourceAndSinkNode.data('justAdded', true);

var consumptionEdge = elementUtilities.addEdge(sourceAndSinkNode.id(), processNode.id(), {class: 'consumption', language: 'PD'});
Expand Down Expand Up @@ -556,7 +556,7 @@ module.exports = function () {
}

elementUtilities.createTranslation = function(regulatorLabel, outputLabel, orientation) {
const defaultSourceAndSinkProperties = elementUtilities.getDefaultProperties("source and sink");
const defaultSourceAndSinkProperties = elementUtilities.getDefaultProperties("empty set");
const defaultNucleicAcidFeatureProperties = elementUtilities.getDefaultProperties("nucleic acid feature");
const defaultMacromoleculePropeties = elementUtilities.getDefaultProperties("macromolecule")
const defaultProcessProperties = elementUtilities.getDefaultProperties("process");
Expand Down Expand Up @@ -597,7 +597,7 @@ module.exports = function () {
nodePosition = elementUtilities.rotate90(nodePosition, processPosition);
}

const inputNode = elementUtilities.addNode(nodePosition.x, nodePosition.y, {class: 'source and sink', language: 'PD'});
const inputNode = elementUtilities.addNode(nodePosition.x, nodePosition.y, {class: 'empty set', language: 'PD'});
inputNode.data("justAdded", true);
inputNode.data("label", label);

Expand Down Expand Up @@ -662,7 +662,7 @@ module.exports = function () {
}

elementUtilities.createTranscription = function(label, orientation) {
const defaultSourceAndSinkProperties = elementUtilities.getDefaultProperties("source and sink");
const defaultSourceAndSinkProperties = elementUtilities.getDefaultProperties("empty set");
const defaultNucleicAcidFeatureProperties = elementUtilities.getDefaultProperties("nucleic acid feature");
const defaultProcessProperties = elementUtilities.getDefaultProperties("process")
const sourceAndSinkWidth = defaultSourceAndSinkProperties.width || 50;
Expand Down Expand Up @@ -702,7 +702,7 @@ module.exports = function () {
nodePosition = elementUtilities.rotate90(nodePosition, processPosition);
}

const inputNode = elementUtilities.addNode(nodePosition.x, nodePosition.y, {class: 'source and sink', language: 'PD'});
const inputNode = elementUtilities.addNode(nodePosition.x, nodePosition.y, {class: 'empty set', language: 'PD'});
inputNode.data("justAdded", true);

const inputEdge = elementUtilities.addEdge(inputNode.id(), processNode.id(), {class: 'consumption', language: 'PD'})
Expand Down Expand Up @@ -826,7 +826,7 @@ module.exports = function () {
nodePosition = elementUtilities.rotate90(nodePosition, processPosition);
}

let outputNode = elementUtilities.addNode(nodePosition.x, nodePosition.y, {class: 'source and sink', language: 'PD'});
let outputNode = elementUtilities.addNode(nodePosition.x, nodePosition.y, {class: 'empty set', language: 'PD'});
outputNode.data("justAdded", true);

let outputEdge = elementUtilities.addEdge(processNode.id(), outputNode.id(), {class: 'production', language: 'PD'})
Expand Down

0 comments on commit 522b431

Please sign in to comment.