Skip to content
Snippets Groups Projects
Commit 279a7e60 authored by hjank's avatar hjank
Browse files

! fixed bug in relationTab: select now displays the right label choice for connection

parent 1cb758c3
Branches master
No related tags found
No related merge requests found
......@@ -72,15 +72,14 @@ function initPlumbCanvas() {
// c = connection element
// e = event
inst.bind("click", function (c, e) {
activateConnection(c);
// needed to prevent clicking the container as well
e.stopPropagation();
activateConnection(c);
});
// triggered if unit container, i.e. canvas is clicked
$("#container").on("click", function() {
$("#container").on("click", function(event) {
if (connectionIsClicked)
return false;
......
......@@ -81,8 +81,10 @@ function fillRelationTab(connection) {
showRelationTab();
// show right selection of the current label in selection bar
var thisScenario = authorSystemContent.getScenario($("#lname")[0].innerHTML);
var thisConnection = thisScenario.getConnectionByID(connection.connection.id);
$("#selectRelations").children("option").each(function() {
if ( $(this)[0].value.toUpperCase() == label.label ) {
if ( $(this)[0].value.toUpperCase() == thisConnection.getLabel().toLowerCase() ) {
$("#selectRelations").select2("data", {
id:$(this)[0].value,
text:$(this)[0].innerHTML
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment