Skip to content

Commit

Permalink
Changed selection highlight and better colors for tags
Browse files Browse the repository at this point in the history
  • Loading branch information
OscarMrZ committed Aug 1, 2024
1 parent 0631620 commit 83eecb3
Show file tree
Hide file tree
Showing 5 changed files with 91 additions and 112 deletions.
135 changes: 68 additions & 67 deletions backend/filesystem/visual_follow_person/code/graph.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"id": "6965f5c5-3788-427f-a066-24494d05dbf4",
"offsetX": 7.892878368298482,
"offsetY": 25.433742918629903,
"zoom": 84.81862193764103,
"offsetX": -15.846152923388189,
"offsetY": -55.77231016762012,
"zoom": 88.81862193764101,
"gridSize": 0,
"layers": [
{
Expand All @@ -23,14 +23,14 @@
{
"id": "dd2fad6f-c19e-4da1-8f90-1719569ce20f",
"type": "point",
"x": 187.84376772566216,
"y": 277.06250857006603
"x": 193.40623062939545,
"y": 277.56249825602373
},
{
"id": "b1eb51c2-fe74-4255-961c-990c011922d9",
"type": "point",
"x": 279.3749563266996,
"y": 286.4843772608484
"x": 280.374969745894,
"y": 286.9843509260406
}
],
"labels": [],
Expand All @@ -51,14 +51,14 @@
{
"id": "29cb329f-75a1-44eb-9b95-98672203bde4",
"type": "point",
"x": 432.54685495684964,
"y": 286.4843772608484
"x": 439.6875191571786,
"y": 286.9843509260406
},
{
"id": "59b7e935-8022-44ff-9352-ef48b49619f4",
"type": "point",
"x": 504.40627081214313,
"y": 377.7656358849267
"x": 505.40622331123984,
"y": 378.2656119530727
}
],
"labels": [],
Expand All @@ -79,14 +79,14 @@
{
"id": "ad947109-2a65-449e-b8df-dfdb7f1c539d",
"type": "point",
"x": 695.296924207766,
"y": 433.64065934218024
"x": 696.2968118433193,
"y": 434.14061816711313
},
{
"id": "c00b9779-b578-4673-ab01-43bcc7bc69a4",
"type": "point",
"x": 646.5468871699974,
"y": 377.7656358849267
"x": 654.8125238846484,
"y": 378.2656119530727
}
],
"labels": [],
Expand All @@ -107,14 +107,14 @@
{
"id": "401c168a-b34c-43f3-a1e6-5e5469d8b0ef",
"type": "point",
"x": 704.1562813061778,
"y": 304.8124973044114
"x": 705.1561921600611,
"y": 305.31250158366663
},
{
"id": "baa288b9-a7ed-460c-9937-9549573d4916",
"type": "point",
"x": 646.5468871699974,
"y": 377.7656358849267
"x": 654.8125238846484,
"y": 378.2656119530727
}
],
"labels": [],
Expand All @@ -135,14 +135,14 @@
{
"id": "ce2571bd-09f1-4f80-8e8a-af7e92bca19d",
"type": "point",
"x": 874.5625794552773,
"y": 451.65625440331723
"x": 875.5625399833403,
"y": 452.15624820422187
},
{
"id": "cf7b46f0-35f3-4c2d-bf9f-e02675cafeed",
"type": "point",
"x": 813.125023281328,
"y": 457.6406318725018
"x": 821.7343711306055,
"y": 457.1406390771352
}
],
"labels": [],
Expand All @@ -163,14 +163,14 @@
{
"id": "deb83a78-bdfa-41df-a96b-05969f2d0261",
"type": "point",
"x": 489.2343661819283,
"y": 131.87499560684688
"x": 490.23432943390856,
"y": 132.37500118579297
},
{
"id": "26e86902-8331-439d-b418-a84285cc6d31",
"type": "point",
"x": 432.54685495684964,
"y": 286.4843772608484
"x": 439.6875191571786,
"y": 286.9843509260406
}
],
"labels": [],
Expand All @@ -191,14 +191,14 @@
{
"id": "4a13e4ba-bb50-4df2-bb97-f8e2dfac604a",
"type": "point",
"x": 423.56254426939654,
"y": 111.828129711965
"x": 425.8750144214988,
"y": 112.32812203960523
},
{
"id": "d9b8989c-9cc5-4570-b069-ea9bbb8d7d94",
"type": "point",
"x": 490.2343859354048,
"y": 155.8750067181775
"x": 491.23435224379324,
"y": 155.37499511095834
}
],
"labels": [],
Expand All @@ -219,14 +219,14 @@
{
"id": "3a729b9a-873f-42fa-b960-7c0992126b1b",
"type": "point",
"x": 367.14059642845154,
"y": 171.37499460374067
"x": 368.23435305307714,
"y": 171.8749936860614
},
{
"id": "c1097e7f-2816-4c39-bb1a-9c1a52498b1f",
"type": "point",
"x": 490.2343859354048,
"y": 179.87499853900363
"x": 491.23435224379324,
"y": 178.3750160209804
}
],
"labels": [],
Expand All @@ -253,8 +253,8 @@
{
"id": "42be04c1-b9a7-482f-a3ad-14af212d8195",
"type": "children",
"x": 182.84382328231513,
"y": 272.06252554571,
"x": 188.40618853959003,
"y": 272.56249214602724,
"name": "children",
"alignment": "right",
"parentNode": "e6829f4f-5e0c-494a-be5c-be3b1a0b5a4c",
Expand All @@ -266,7 +266,8 @@
}
],
"name": "Tree Root",
"color": "rgb(0,204,0)"
"color": "rgb(0,204,0)",
"is_selected": false
},
"ac94de35-3590-41a2-9126-2e77c61ee0ca": {
"id": "ac94de35-3590-41a2-9126-2e77c61ee0ca",
Expand All @@ -278,8 +279,8 @@
{
"id": "36e40ad6-1c14-47b1-84f3-b8e73789312e",
"type": "parent",
"x": 274.3749804971789,
"y": 281.48437231667464,
"x": 275.3749996157065,
"y": 281.9843448160441,
"name": "parent",
"alignment": "left",
"parentNode": "ac94de35-3590-41a2-9126-2e77c61ee0ca",
Expand All @@ -292,8 +293,8 @@
{
"id": "ddfba7cc-8323-4f0f-b4b4-bb98530f1139",
"type": "children",
"x": 427.5468208980228,
"y": 281.48437231667464,
"x": 434.68754902699106,
"y": 281.9843448160441,
"name": "children",
"alignment": "right",
"parentNode": "ac94de35-3590-41a2-9126-2e77c61ee0ca",
Expand All @@ -319,8 +320,8 @@
{
"id": "6cc9f3ad-6755-431d-9598-619b622c32d1",
"type": "parent",
"x": 499.4062492067781,
"y": 372.76563357006614,
"x": 500.4062531810523,
"y": 373.26562383298074,
"name": "parent",
"alignment": "left",
"parentNode": "caee1cd4-8ea8-4cf6-aec6-0d7659c9a5b7",
Expand All @@ -333,8 +334,8 @@
{
"id": "d5707c1a-baac-49c2-8c90-9edee7c70a14",
"type": "children",
"x": 641.5468655646323,
"y": 372.76563357006614,
"x": 649.8125537544609,
"y": 373.26562383298074,
"name": "children",
"alignment": "right",
"parentNode": "caee1cd4-8ea8-4cf6-aec6-0d7659c9a5b7",
Expand All @@ -360,8 +361,8 @@
{
"id": "20c96d61-e98a-49a9-9fbf-56beeea71e79",
"type": "parent",
"x": 690.2969026024009,
"y": 428.64065702731966,
"x": 691.2968417131318,
"y": 429.14061205711664,
"name": "parent",
"alignment": "left",
"parentNode": "73822b50-af96-4d13-94bf-757f416e1043",
Expand All @@ -374,8 +375,8 @@
{
"id": "c26a8347-9953-45c2-9c90-b0bd441937a4",
"type": "output",
"x": 808.125001675963,
"y": 452.64062955764126,
"x": 816.734401000418,
"y": 452.14066894694764,
"name": "person_pos",
"alignment": "right",
"parentNode": "73822b50-af96-4d13-94bf-757f416e1043",
Expand All @@ -400,8 +401,8 @@
{
"id": "4abb7653-f821-41d7-bfb5-2867d4982c9b",
"type": "parent",
"x": 699.1561825387947,
"y": 299.8124949895509,
"x": 700.1562220298736,
"y": 300.31249547367014,
"name": "parent",
"alignment": "left",
"parentNode": "8ab1053a-e9ce-4027-bb3b-e13e5a9ce04d",
Expand All @@ -425,8 +426,8 @@
{
"id": "698b9aca-20ec-4710-a0c1-293286225843",
"type": "tag input",
"x": 869.5626350119302,
"y": 446.6562520884567,
"x": 870.5624978935349,
"y": 447.1562420942254,
"name": "tag input",
"alignment": "left",
"parentNode": "d297d2e6-60c0-4b37-8ee5-5f45421794ef",
Expand All @@ -438,7 +439,7 @@
}
],
"name": "{person_pos}",
"color": "rgb(0,0,0)",
"color": "#5BA498",
"is_selected": false,
"is_blackboard": true
},
Expand All @@ -452,8 +453,8 @@
{
"id": "0bacbebb-9c40-4a17-879b-218a7251b767",
"type": "parent",
"x": 484.2343445765632,
"y": 126.87499329198634,
"x": 485.2342873441031,
"y": 127.37500407074872,
"name": "parent",
"alignment": "left",
"parentNode": "3ee01374-0713-4fb6-8da1-eba9e95e5372",
Expand All @@ -466,8 +467,8 @@
{
"id": "a93881ea-5273-4c20-be82-6f8b19289222",
"type": "input",
"x": 485.2343643300398,
"y": 150.87500440331695,
"x": 486.2343821136057,
"y": 150.37498900096185,
"name": "person_pos",
"alignment": "left",
"parentNode": "3ee01374-0713-4fb6-8da1-eba9e95e5372",
Expand All @@ -480,8 +481,8 @@
{
"id": "43840451-2a2d-4dd3-8cf0-e3cd036b7389",
"type": "input",
"x": 485.2343643300398,
"y": 174.87499622414308,
"x": 486.2343821136057,
"y": 173.37500991098392,
"name": "image_x_center",
"alignment": "left",
"parentNode": "3ee01374-0713-4fb6-8da1-eba9e95e5372",
Expand All @@ -506,8 +507,8 @@
{
"id": "e733b924-4f0c-4b03-91d9-4726f561f187",
"type": "tag output",
"x": 418.5625226640315,
"y": 106.82812739710445,
"x": 420.87504429131127,
"y": 107.32811592960874,
"name": "tag output",
"alignment": "right",
"parentNode": "91bfb59f-2d8f-4d98-b10b-e63dc573c5db",
Expand All @@ -519,7 +520,7 @@
}
],
"name": "{person_pos}",
"color": "rgb(0,0,0)",
"color": "#5BA498",
"is_selected": false,
"is_blackboard": true
},
Expand All @@ -533,8 +534,8 @@
{
"id": "4932da80-3a61-4afc-8fa4-8a16fb257330",
"type": "tag output",
"x": 362.14057482308647,
"y": 166.3750019341324,
"x": 363.2343829228896,
"y": 166.8750055659694,
"name": "tag output",
"alignment": "right",
"parentNode": "c3ddb5d3-470b-41bb-bdb6-1dd3f9b40d67",
Expand All @@ -546,7 +547,7 @@
}
],
"name": "320",
"color": "rgb(255,153,51)",
"color": "#A45B67",
"is_selected": false
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,6 @@ export class BasicNodeModel extends NodeModel<
private color: string;
private is_selected: boolean;

private static select_border_color: string = "rgb(18,109,114)";
private static base_border_color: string = "rgb(0,0,0)";

private static select_border_radius: string = "5";
private static base_border_radius: string = "1";

constructor(name: string = "Basic Node", color: string = "rgb(0,192,255)") {
super({
type: "basic",
Expand All @@ -49,20 +43,8 @@ export class BasicNodeModel extends NodeModel<
return this.color;
}

getBorderColor(): string {
if (this.is_selected) {
return BasicNodeModel.select_border_color;
} else {
return BasicNodeModel.base_border_color;
}
}

getBorderRadius(): string {
if (this.is_selected) {
return BasicNodeModel.select_border_radius;
} else {
return BasicNodeModel.base_border_radius;
}
isSelected(): boolean {
return this.is_selected;
}

selectNode() {
Expand Down
Loading

0 comments on commit 83eecb3

Please sign in to comment.