Opam_graph: UI: Played around with hitbox for layer2 deps to fix firefox hover-hitbox - firefox seems broken vs chromium
This commit is contained in:
parent
9c6d140c43
commit
0a875c2e35
1 changed files with 17 additions and 5 deletions
|
@ -275,6 +275,10 @@ line {
|
|||
transform: scale(2);
|
||||
}
|
||||
|
||||
.layer2_dep.node:hover {
|
||||
transform: scale(1.4);
|
||||
}
|
||||
|
||||
|}
|
||||
|
||||
(* disabled CSS
|
||||
|
@ -327,7 +331,7 @@ line {
|
|||
] []
|
||||
]
|
||||
|
||||
let make_rect ~center_pos ~width =
|
||||
let make_square ~center_pos ~width =
|
||||
let open Gg in
|
||||
let center_pos = V2.v center_pos.x center_pos.y in
|
||||
let diagonal = V2.v width width in
|
||||
|
@ -393,6 +397,14 @@ line {
|
|||
|} dep dep dep dep dep dep
|
||||
(*< goto move generation of node-css to some other place*)
|
||||
|
||||
(*disabled css:
|
||||
(*> problem: selected other following children as well*)
|
||||
.layer2_dep.hitbox.%s:hover ~ .layer2_dep.node.%s {
|
||||
transform: scale(1.4);
|
||||
}
|
||||
|
||||
*)
|
||||
|
||||
let make_triangle ~top ~left ~right =
|
||||
let a = Svg.[
|
||||
a_points [
|
||||
|
@ -533,7 +545,7 @@ line {
|
|||
a_class ("hitbox" :: classes);
|
||||
a_transform_origin @@ sprintf "%f %f" center_pos.x center_pos.y;
|
||||
] in
|
||||
Svg.g ~a (title :: make_rect ~center_pos ~width)
|
||||
Svg.g ~a (title :: make_square ~center_pos ~width)
|
||||
|
||||
let make_layer2_nodes_grid ~layer2_deps ~layer2_deps_center =
|
||||
let open Gg in
|
||||
|
@ -550,7 +562,7 @@ line {
|
|||
make_hitbox_square ~text ~classes
|
||||
~center_pos:pos
|
||||
~width:cell_width in
|
||||
[ visual_svg; hitbox_svg ]
|
||||
[ (* hitbox_svg; *)visual_svg ]
|
||||
)
|
||||
|> List.flatten
|
||||
|
||||
|
|
Loading…
Reference in a new issue