Skip to content

Commit 7b84f7f

Browse files
committed
[DAPS-14xx] Move files over and move out svg
1 parent 06d4aff commit 7b84f7f

File tree

4 files changed

+58
-68
lines changed

4 files changed

+58
-68
lines changed
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
function defineArrowMarkerDeriv(a_svg) {
2+
a_svg
3+
.append("defs")
4+
.append("marker")
5+
.attr("id", "arrow-derivation")
6+
.attr("refX", -2.5)
7+
.attr("refY", 2)
8+
.attr("orient", "auto")
9+
.attr("markerWidth", 5)
10+
.attr("markerHeight", 4)
11+
.append("svg:path")
12+
.attr("class", "arrow-path derivation")
13+
.attr("d", "M 5,0 L 0,2 L 5,4");
14+
}
15+
16+
function defineArrowMarkerComp(a_svg) {
17+
a_svg
18+
.append("defs")
19+
.append("marker")
20+
.attr("id", "arrow-component")
21+
.attr("refX", -2.5)
22+
.attr("refY", 2)
23+
.attr("orient", "auto")
24+
.attr("markerWidth", 8)
25+
.attr("markerHeight", 4)
26+
.append("svg:path")
27+
.attr("class", "arrow-path component")
28+
.attr("d", "M 4,0 L 0,2 L 4,4 L 8,2");
29+
}
30+
31+
// New version marker at 'end'
32+
function defineArrowMarkerNewVer(a_svg, a_name) {
33+
a_svg
34+
.append("defs")
35+
.append("marker")
36+
.attr("id", "arrow-new-version")
37+
.attr("refX", -2.5)
38+
.attr("refY", 2)
39+
.attr("orient", "auto")
40+
.attr("markerWidth", 7)
41+
.attr("markerHeight", 4)
42+
.append("svg:path")
43+
.attr("class", "arrow-path new-version")
44+
.attr("d", "M 5,0 L 0,2 L 5,4 L 5,0 M 6,0 L 7,0 L 7,4 L 6,4 L 6,0");
45+
}
46+
47+
export { defineArrowMarkerDeriv, defineArrowMarkerComp, defineArrowMarkerNewVer };

web/static/panel_graph.js renamed to web/static/components/provenance/panel_graph.js

Lines changed: 9 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
1-
import * as util from "./util.js";
2-
import * as model from "./model.js";
3-
import * as api from "./api.js";
4-
import * as panel_info from "./panel_item_info.js";
1+
import * as util from "../../util.js";
2+
import * as model from "../../model.js";
3+
import * as api from "../../api.js";
4+
import * as panel_info from "../../panel_item_info.js";
5+
import {
6+
defineArrowMarkerComp,
7+
defineArrowMarkerDeriv,
8+
defineArrowMarkerNewVer,
9+
} from "./assets/arrow-markers.js";
510

611
export function newGraphPanel(a_id, a_frame, a_parent) {
712
return new GraphPanel(a_id, a_frame, a_parent);
@@ -875,65 +880,3 @@ function graphPruneCalc(a_node, a_visited, a_source) {
875880

876881
return a_node.prune;
877882
}
878-
879-
function defineArrowMarkerDeriv(a_svg) {
880-
a_svg
881-
.append("defs")
882-
.append("marker")
883-
.attr("id", "arrow-derivation")
884-
.attr("refX", -2.5)
885-
.attr("refY", 2)
886-
.attr("orient", "auto")
887-
.attr("markerWidth", 5)
888-
.attr("markerHeight", 4)
889-
.append("svg:path")
890-
.attr("class", "arrow-path derivation")
891-
.attr("d", "M 5,0 L 0,2 L 5,4");
892-
}
893-
894-
function defineArrowMarkerComp(a_svg) {
895-
a_svg
896-
.append("defs")
897-
.append("marker")
898-
.attr("id", "arrow-component")
899-
.attr("refX", -2.5)
900-
.attr("refY", 2)
901-
.attr("orient", "auto")
902-
.attr("markerWidth", 8)
903-
.attr("markerHeight", 4)
904-
.append("svg:path")
905-
.attr("class", "arrow-path component")
906-
.attr("d", "M 4,0 L 0,2 L 4,4 L 8,2");
907-
}
908-
909-
/*
910-
Old version marker at 'start'
911-
function defineArrowMarkerNewVer( a_svg, a_name ){
912-
a_svg.append('defs').append('marker')
913-
.attr('id','arrow-new-version')
914-
.attr('refX',8.5)
915-
.attr('refY',2)
916-
.attr('orient','auto')
917-
.attr('markerWidth',10)
918-
.attr('markerHeight',4)
919-
.append('svg:path')
920-
.attr('class','arrow-path new-version')
921-
.attr('d', 'M 2,0 L 6,2 L 2,4 M 4,2 L 0,4 L 0,0');
922-
}
923-
*/
924-
925-
// New version marker at 'end'
926-
function defineArrowMarkerNewVer(a_svg, a_name) {
927-
a_svg
928-
.append("defs")
929-
.append("marker")
930-
.attr("id", "arrow-new-version")
931-
.attr("refX", -2.5)
932-
.attr("refY", 2)
933-
.attr("orient", "auto")
934-
.attr("markerWidth", 7)
935-
.attr("markerHeight", 4)
936-
.append("svg:path")
937-
.attr("class", "arrow-path new-version")
938-
.attr("d", "M 5,0 L 0,2 L 5,4 L 5,0 M 6,0 L 7,0 L 7,4 L 6,4 L 6,0");
939-
}

web/static/main_browse_tab.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import * as settings from "./settings.js";
55
import * as dialogs from "./dialogs.js";
66
import * as panel_info from "./panel_item_info.js";
77
import * as panel_cat from "./panel_catalog.js";
8-
import * as panel_graph from "./panel_graph.js";
8+
import * as panel_graph from "./components/provenance/panel_graph.js";
99
import * as panel_search from "./panel_search.js";
1010
import * as dlgDataNewEdit from "./dlg_data_new_edit.js";
1111
import * as dlgRepoEdit from "./dlg_repo_edit.js";

web/views/main.ect

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
<script nonce="<%= @nonce %>" type="module" charset="utf-8" src="/dlg_schema_list.js"></script>
5151
<script nonce="<%= @nonce %>" type="module" charset="utf-8" src="/dlg_query_builder.js"></script>
5252
<script nonce="<%= @nonce %>" type="module" charset="utf-8" src="/panel_catalog.js"></script>
53-
<script nonce="<%= @nonce %>" type="module" charset="utf-8" src="/panel_graph.js"></script>
53+
<script nonce="<%= @nonce %>" type="module" charset="utf-8" src="/components/provenance/panel_graph.js"></script>
5454
<script nonce="<%= @nonce %>" type="module" charset="utf-8" src="/panel_item_info.js"></script>
5555
<script nonce="<%= @nonce %>" type="module" charset="utf-8" src="/main_browse_tab.js"></script>
5656
<script nonce="<%= @nonce %>" type="module" charset="utf-8" src="/main.js"></script>

0 commit comments

Comments
 (0)