Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Benoit Barbot
GraphEditor
Commits
804f049b
Commit
804f049b
authored
Dec 21, 2018
by
Benoit Barbot
Browse files
prog
parent
b0b0446d
Pipeline
#980
passed with stage
in 31 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
editor/graphDrawing.ml
View file @
804f049b
...
...
@@ -317,8 +317,7 @@ module GraphEditor (G: GRAPH ) = struct
download string_value "graph.gex" "data:application/xml") ]
[pcdata "Get GEX"];*)
button
~
a
:
[
a_onclick
(
fun
_
->
layout_graph
s
;
draw
s
(
0
.
0
,
0
.
0
))]
[
pcdata
"Layout Graph"
];
Raw
.
a
~
a
:
[
a_href
"tikzeditor.html?q=GEXNAm6Yh+QlTMY29udGVudA==SEYQ==lTMQXR0cmlidXRlSIZHJhdw==NAr3Al7QlTMY29udGVudA==SEYg==lTMQXR0cmlidXRlSIZHJhdw==AABlTMQXR0cmlidXRlSIZHJhdw==lTMQXR0cmlidXRlSELT4="
]
[
pcdata
"Direct Link"
]
update_link
"Direct Link"
(
fun
n
->
(
n
^
"?q="
^
(
get_exchange_string
s
.
graph
)))
]]
let
init
canvas_elt
attr_list_div
saveload_elt
slider_elt
=
...
...
editor/utilsWeb.ml
View file @
804f049b
...
...
@@ -13,6 +13,16 @@ let text_input ?(class_ = "") ?(on_change = fun _ -> true) value =
input
##.
className
:=
Js
.
string
class_
;
input2
let
update_link
n
f
=
let
link
=
Raw
.
a
~
a
:
[
a_href
"#"
]
[
pcdata
n
]
in
let
domlink
=
Eliom_content
.
Html
.
To_dom
.
of_a
link
in
let
currref
=
Js
.
to_string
Dom_html
.
window
##.
location
##.
href
in
domlink
##.
onmouseover
:=
Dom
.
handler
(
fun
_
->
let
string_value
=
f
currref
in
domlink
##.
href
:=
Js
.
string
string_value
;
Js
.
_true
);
link
let
choice_input
?
(
class_
=
""
)
?
(
on_change
=
fun
_
->
()
)
?
(
init_value
=
None
)
option_list
=
let
choice_list
=
List
.
map
(
fun
x
->
option
(
pcdata
(
">"
^
x
)))
option_list
in
let
input2
=
select
(
match
init_value
with
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment