Skip to content

Commit

Permalink
Merge pull request #158 from NikitaZotov/feat/scg_edge_var_common_styles
Browse files Browse the repository at this point in the history
fix: sc.g-edge and sc.g-arc common var styles
  • Loading branch information
NikitaZotov authored Jan 11, 2024
2 parents d88bbcf + 08795fd commit 2a67611
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 39 deletions.
41 changes: 26 additions & 15 deletions components/scg/src/scg-alphabet.js
Original file line number Diff line number Diff line change
Expand Up @@ -337,30 +337,41 @@ var SCgAlphabet = {
} else if (edge.sc_type & (sc_type_arc_common | sc_type_edge_common)) {
let main_style = 'SCgEdgeCommonBack';
if (edge.sc_type & sc_type_edge_common) {
d3_group.append('svg:path')
.classed(main_style, true)
.attr('d', position_path);
if (edge.sc_type & sc_type_var) {
d3_group.append('svg:path')
.classed('SCgEdgeVarDashCommon ' + SCgAlphabet.classLevel(edge), true)
.attr('d', position_path);
}
else {
d3_group.append('svg:path')
.classed(main_style, true)
.attr('d', position_path);
}
}

if (edge.sc_type & sc_type_arc_common) {
d3_group.append('svg:path')
.classed('SCgEdgeCommonBack', true)
.classed('SCgEdgeEndArrowCommon ' + SCgAlphabet.classLevel(edge), edge.sc_type & sc_type_arc_common)
.style("marker-end", "url(#end-arrow-common_" + containerId + ")")
.attr('d', position_path);
if (edge.sc_type & sc_type_var) {
d3_group.append('svg:path')
.classed('SCgEdgeVarDashCommon ' + SCgAlphabet.classLevel(edge), true)
.classed('SCgEdgeEndArrowCommon ' + SCgAlphabet.classLevel(edge), true)
.style("marker-end", "url(#end-arrow-common_" + containerId + ")")
.attr('d', position_path);
}
else {
d3_group.append('svg:path')
.classed('SCgEdgeCommonBack', true)
.classed('SCgEdgeEndArrowCommon ' + SCgAlphabet.classLevel(edge), true)
.style("marker-end", "url(#end-arrow-common_" + containerId + ")")
.attr('d', position_path);
}
}

d3_group.append('svg:path')
.classed('SCgEdgeCommonForeground ' + SCgAlphabet.classLevel(edge), true)
.attr('d', position_path)

if (edge.sc_type & sc_type_constancy_mask) {
if (edge.sc_type & sc_type_var) {
d3_group.append('svg:path')
.classed('SCgEdgeVarDashCommon ' + SCgAlphabet.classLevel(edge), true)
.attr('d', position_path);
}
} else {
if ((edge.sc_type & sc_type_constancy_mask) === 0)
{
d3_group.append('svg:path')
.classed('SCgEdgeVarDashCommon ' + SCgAlphabet.classLevel(edge), true)
.attr('d', position_path);
Expand Down
26 changes: 2 additions & 24 deletions components/scg/static/components/css/scg.css
Original file line number Diff line number Diff line change
Expand Up @@ -272,31 +272,9 @@
}

.SCgEdgeVarDashCommon {
stroke-width: 8px;
stroke-dasharray: 14, 14;
}
.SCgEdgeVarDashCommon.DBSCgFirstLevelView {
stroke-width: 2;
}
.SCgEdgeVarDashCommon.DBSCgSecondLevelView {
stroke-width: 1.5;
}
.SCgEdgeVarDashCommon.DBSCgThirdLevelView {
stroke-width: 1;
}
.SCgEdgeVarDashCommon.DBSCgFourthLevelView {
stroke-width: 0.5;
}
.SCgEdgeVarDashCommon.DBSCgFifthLevelView {
stroke-width: 0.5;
opacity: 0.8;
}
.SCgEdgeVarDashCommon.DBSCgSixthLevelView {
stroke-width: 0.5;
opacity: 0.6;
}
.SCgEdgeVarDashCommon.DBSCgSeventhLevelView {
stroke-width: 0.5;
opacity: 0.4;
fill: none;
}

.SCgEdgePermNegDash {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Fixed
- Fix sc.g-edge and sc.g-arc common var styles

## [0.8.0-Fusion] - 24.09.2023
### Added
- Add CLI argument to add hosts to CORS Allowed Origin header
Expand Down

0 comments on commit 2a67611

Please sign in to comment.