variable change from GLVisualize

This commit is contained in:
SimonDanisch 2016-11-07 17:12:03 +01:00
parent 2200b76054
commit 612ca15fc0

View File

@ -119,6 +119,7 @@ function create_window(plt::Plot{GLVisualizeBackend}, visible)
GLWindow.pollevents() GLWindow.pollevents()
if Base.n_avail(Reactive._messages) > 0 if Base.n_avail(Reactive._messages) > 0
Reactive.run_till_now() Reactive.run_till_now()
Base.n_avail(Reactive._messages) > 0 && Reactive.run_till_now() # two times for secondary signals
GLWindow.render_frame(screen) GLWindow.render_frame(screen)
GLWindow.swapbuffers(screen) GLWindow.swapbuffers(screen)
end end
@ -413,7 +414,9 @@ function hover(to_hover, to_display, window)
end end
mh = GLWindow.mouse2id(window) mh = GLWindow.mouse2id(window)
popup = GLWindow.Screen( popup = GLWindow.Screen(
window, hidden=true, area=area, window,
hidden = map(mh-> !(mh.id == to_hover.id), mh),
area = area,
stroke = (2f0/100f0, RGBA(0f0, 0f0, 0f0, 0.8f0)) stroke = (2f0/100f0, RGBA(0f0, 0f0, 0f0, 0.8f0))
) )
cam = get!(popup.cameras, :perspective) do cam = get!(popup.cameras, :perspective) do
@ -423,9 +426,6 @@ function hover(to_hover, to_display, window)
theta= Signal(Vec3f0(0)), trans= Signal(Vec3f0(0)) theta= Signal(Vec3f0(0)), trans= Signal(Vec3f0(0))
) )
end end
Reactive.preserve(map(mh) do mh
popup.hidden = !(mh.id == to_hover.id)
end)
map(enumerate(to_display)) do id map(enumerate(to_display)) do id
i,d = id i,d = id