Skip to content

Commit

Permalink
Update v0.7.1
Browse files Browse the repository at this point in the history
  • Loading branch information
jSchuetz88 committed Sep 8, 2024
1 parent e95dbd8 commit d70bb9a
Show file tree
Hide file tree
Showing 16 changed files with 165 additions and 1,629 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
css/.DS_Store
charts/.DS_Store
20 changes: 0 additions & 20 deletions charts/chord/index.csv

This file was deleted.

53 changes: 45 additions & 8 deletions charts/chord/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -58,24 +58,21 @@ path.link {
opacity: 1;
}

path.link.licensing {
stroke-dasharray: 0,2 1;
stroke: #CCCCCC;
}

path.link.outgoing {
stroke: #FFA600;
}

path.link.ingoing {
path.link.ingoing,
path.link.ingoing_l2 {
stroke: #ADB71A;
}

path.link.outgoing_deprecated {
stroke: #AA0000;
}

path.link.outgoing_l2{
path.link.outgoing_l2,
path.link.ingoing_l2{
stroke-dasharray: 0,2 1;
}

Expand All @@ -100,10 +97,16 @@ circle.outgoing_l3 {
stroke-dasharray: 0,2 1;
}

circle.ingoing {
circle.ingoing,
circle.ingoing_l2,
circle.ingoing_l3{
stroke: #ADB71A;
}

circle.ingoing_l3{
stroke-dasharray: 0,2 1;
}

circle.outgoing_deprecated {
stroke: #AA0000;
}
Expand Down Expand Up @@ -168,4 +171,38 @@ text.main{

.dep_settings.active .state::before{
content: "✓";
}

/* Context Menu */

#contextMenu {
display: none;
position: absolute;
background-color: white;
border: 1px solid #ccc;
box-shadow: 2px 2px 5px rgba(0,0,0,0.5);
z-index: 1000;
}
#contextMenu ul {
list-style: none;
padding: 0;
margin: 0;
}
#contextMenu ul li.list {
padding: 8px 12px;
cursor: pointer;
font-size: 12px;
}
#contextMenu ul li.list:hover {
background-color: #eee;
}

#contextMenu ul li.title {
text-align: center;
font-size: 12px;
font-weight: bold;
background-color: #FFA600;
color: #FFF;
padding: 8px;
cursor: initial;
}
117 changes: 109 additions & 8 deletions charts/network/network.js
Original file line number Diff line number Diff line change
@@ -1,28 +1,86 @@
var current_cxId = null;
var listOfOpendOutgoingCXElements = Array();
var listOfOpendIngoingCXElements = Array();

function add_ListOfOpendOutgoingCXElements(cxId){
listOfOpendOutgoingCXElements[cxId] = 1;

test(current_cxId);
}

function remove_ListOfOpendOutgoingCXElements(cxId){
unset(listOfOpendOutgoingCXElements[cxId]);

test(current_cxId);
}

function add_ListOfOpendIngoingCXElements(cxId){
listOfOpendIngoingCXElements[cxId] = 1;

test(current_cxId);
}

function remove_ListOfOpendIngoingCXElements(cxId){
unset(listOfOpendIngoingCXElements[cxId]);

test(current_cxId);
}

function clear_allLists(){
listOfOpendOutgoingCXElements = Array();
listOfOpendIngoingCXElements = Array();

test(current_cxId);
}

function openCXSelector(event, cxId){
jQuery('#contextMenu ul').html('');
jQuery('#contextMenu ul').append(
'<li class="title">'+cxId+'</li>'+
'<li onClick="javascript:add_ListOfOpendOutgoingCXElements(\''+cxId+'\');" class="list">Show outgoing dependencies</li>'+
'<li onClick="javascript:add_ListOfOpendIngoingCXElements(\''+cxId+'\');" class="list">Show ingoing dependencies</li>'+
'');

jQuery('#contextMenu').css({
display: 'block',
left: event.pageX,
top: event.pageY
});
}

jQuery(document).on('click', function() {
jQuery('#contextMenu').hide();
});

var controls_network = {
setting_l2de : false,
setting_ingoing : false,
setting_outgoing : true,
setting_ingoing : true,
setting_outgoing : false,

toggle_l2dep : function(element){
this.setting_l2de = !this.setting_l2de;

jQuery(element).toggleClass('active');
jQuery('.dep_settings.l2').toggleClass('active');
if(current_cxId) test(current_cxId);
},

toggle_ingoing : function(element){
this.setting_ingoing = !this.setting_ingoing;
this.setting_outgoing = !this.setting_ingoing;

jQuery('.dep_settings.ingoing').toggleClass('active');
jQuery('.dep_settings.outgoing').toggleClass('active');

jQuery(element).toggleClass('active');
if(current_cxId) test(current_cxId);
},

toggle_outgoing : function(element){
this.setting_outgoing = !this.setting_outgoing;
this.setting_ingoing = !this.setting_outgoing;

jQuery('.dep_settings.ingoing').toggleClass('active');
jQuery('.dep_settings.outgoing').toggleClass('active');

jQuery(element).toggleClass('active');
if(current_cxId) test(current_cxId);
}
};
Expand Down Expand Up @@ -62,13 +120,38 @@ function test(selectedId){
if(CX.getStandard(cxId).getDependencies().getStandards().includes(selectedId)){
links[j] = {"source": cxId, "target": selectedId, "value": 2, "type" : "ingoing", sNode: "ingoing", tNode: "main"};

// Load second level references only, if selected
if(controls_network.setting_l2de){
for (var cxIdl2 of Object.keys(CX.getAllStandards('onlyValid'))){
if(CX.getStandard(cxIdl2).getDependencies().getStandards().includes(cxId)){
j++;
links[j] = {"source": cxIdl2, "target": cxId, "value": 2, "type" : "ingoing_l2", sNode: "ingoing_l3", tNode: "ingoing_l2"};
}
}
}

j++;
}
/*
if(!CX.getStandard(dependencyId).isDeprecated()){
}
}

// load individual elements -> outgoing
for (var xxxId of Object.keys(listOfOpendOutgoingCXElements)){
for (var dependencyId of CX.getStandard(xxxId).getDependencies().getStandards()){
links[j] = {"source": xxxId, "target": dependencyId, "value": 2, "type" : "outgoing_l2", sNode: "outgoing_l2", tNode: "outgoing_l3"};
j++;
}
}

// load individual elements -> ingoing
for (var xxxId of Object.keys(listOfOpendIngoingCXElements)){

for (var cxId of Object.keys(CX.getAllStandards('onlyValid'))){
if(CX.getStandard(cxId).getDependencies().getStandards().includes(xxxId)){
links[j] = {"source": cxId, "target": xxxId, "value": 2, "type" : "ingoing", sNode: "ingoing", tNode: "ingoing_l2"};

j++;
}
*/
}
}

Expand Down Expand Up @@ -96,6 +179,16 @@ var simulation = d3.forceSimulation(Object.values(nodes))
.force("center", d3.forceCenter(width / 2, height / 2))
.on("tick", tick);

/*
simulation.stop();
for (var i = 0; i < 300; ++i) {
simulation.tick();
}
// Aktualisiere die Positionen der Knoten
tick();
*/

var svg = d3.select("#testssss")
.attr("width", width)
.attr("height", height);
Expand Down Expand Up @@ -133,6 +226,13 @@ var circle = svg.append("g").selectAll("circle")
.on("start", dragstarted)
.on("drag", dragged)
.on("end", dragended));
/*
.on("contextmenu", function(event, d) {
event.preventDefault();
openCXSelector(event, d.name);
});
*/


var text = svg.append("g").selectAll("text")
.data(Object.values(nodes))
Expand Down Expand Up @@ -189,4 +289,5 @@ function dragended(event, d) {
d.fx = null;
d.fy = null;
}

}
107 changes: 0 additions & 107 deletions css/assets.css

This file was deleted.

Empty file removed css/details.css
Empty file.
Loading

0 comments on commit d70bb9a

Please sign in to comment.