Skip to content

Commit

Permalink
clean up some more observables for blocks and axis
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonDanisch committed Dec 15, 2023
1 parent 0b80f71 commit 0bc9d84
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/makielayout/blocks.jl
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ end
function init_observable!(@nospecialize(block), key::Symbol, @nospecialize(OT), @nospecialize(value::Observable))
obstype = observable_type(OT)
o = Observable{obstype}()
map!(o, value) do v
map!(block.blockscene, o, value) do v
convert_for_attribute(obstype, v)
end
setfield!(block, key, o)
Expand Down
3 changes: 2 additions & 1 deletion src/makielayout/blocks/axis.jl
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,8 @@ function initialize_block!(ax::Axis; palette = nothing)
notify(ax.xscale)

# 3. Update the view onto the plot (camera matrices)
onany(update_axis_camera, camera(scene), scene.transformation.transform_func, finallimits, ax.xreversed, ax.yreversed, priority = -2)
onany(update_axis_camera, blockscene, camera(scene), scene.transformation.transform_func, finallimits,
ax.xreversed, ax.yreversed; priority=-2)

xaxis_endpoints = lift(blockscene, ax.xaxisposition, scene.viewport;
ignore_equal_values=true) do xaxisposition, area
Expand Down

0 comments on commit 0bc9d84

Please sign in to comment.