add image-overlay
This commit is contained in:
parent
017166dd06
commit
6fcd7ecda7
10 changed files with 132 additions and 77 deletions
|
|
@ -13,7 +13,7 @@ type t =
|
|||
; map_view : float * float * int
|
||||
; (* todo: just remove rect from here *)
|
||||
quickview : (rect * (post_id, post) wrap) option
|
||||
; opened_image : post_id option
|
||||
; opened_image : Img_info.t option
|
||||
; error : Client_types.error option
|
||||
}
|
||||
|
||||
|
|
@ -264,11 +264,7 @@ let do_action : Client_types.action -> t -> t =
|
|||
| _ -> ()
|
||||
end;
|
||||
{ t with quickview }
|
||||
| Image_click id -> (
|
||||
match t.opened_image with
|
||||
| Some current_image_id when Int.equal current_image_id id ->
|
||||
{ t with opened_image = None }
|
||||
| Some _ | None -> { t with opened_image = Some id } )
|
||||
| Image_change opened_image -> { t with opened_image }
|
||||
| Clear_error -> { t with error = None }
|
||||
|
||||
let do_data_update : Client_types.data_update -> t -> t =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue