Skip to content

Commit

Permalink
Fix picking warning and update_axis_camera (#2352)
Browse files Browse the repository at this point in the history
* fix picking warning for WGLMakie

* preserve type for heterogenous input types
  • Loading branch information
SimonDanisch authored Oct 21, 2022
1 parent 853d17e commit c8a36f3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 0 additions & 4 deletions WGLMakie/src/events.jl
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,3 @@ function connect_scene_events!(scene::Scene, comm::Observable)
end
return
end

function Makie.pick(scene::Scene, THREE::ThreeDisplay, xy::Vec{2,Float64})
return @warn "Picking not supported yet by WGLMakie"
end
5 changes: 5 additions & 0 deletions src/interaction/events.jl
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@ Picks a mouse position. Implemented by the backend.
"""
function pick end

function pick(::Scene, ::Screen, xy) where Screen
@warn "Picking not supported yet by $(parentmodule(Screen))" maxlog=1
return nothing, 0
end

"""
onpick(func, plot)
Calls `func` if one clicks on `plot`. Implemented by the backend.
Expand Down
1 change: 1 addition & 0 deletions src/makielayout/blocks/axis.jl
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ function update_axis_camera(camera::Camera, t, lims, xrev::Bool, yrev::Bool)
bottomtop = yrev ? (top, bottom) : (bottom, top)

projection = Makie.orthographicprojection(
Float32,
leftright...,
bottomtop..., nearclip, farclip)

Expand Down

0 comments on commit c8a36f3

Please sign in to comment.