Skip to content

Commit

Permalink
Remove debug statements
Browse files Browse the repository at this point in the history
  • Loading branch information
asinghvi17 committed Jun 4, 2022
1 parent 61ee53e commit 599e860
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/makielayout/blocks/polaraxis.jl
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,10 @@ function draw_axis!(po::PolarAxis)

end

# on() do i
# adjustcam!(po, po.limits[])
# end

# on(po.scene.px_area) do pxarea
# adjustcam!(po)
# end
Expand Down Expand Up @@ -326,7 +330,9 @@ end
function MakieLayout.autolimits!(po::PolarAxis)
datalims = Rect2f(data_limits(po.scene))
projected_datalims = Makie.apply_transform(po.scene.transformation.transform_func[], datalims)
# @show projected_datalims
po.limits[] = (datalims.origin[1], datalims.origin[1] + datalims.widths[1])
# @show po.limits[]
adjustcam!(po, po.limits[])
notify(po.limits)
end
Expand All @@ -345,12 +351,14 @@ end


"Adjust the axis's scene's camera to conform to the given r-limits"
function adjustcam!(po::PolarAxis, limits)
function adjustcam!(po::PolarAxis, limits::NTuple{2, <: Real})
@assert limits[1] limits[2]
scene = po.scene
# We transform our limits to transformed space, since we can
# operate linearly there
# @show boundingbox(scene)
target = Makie.apply_transform((scene.transformation.transform_func[]), BBox(limits..., 0, 2π))
# @show target
area = scene.px_area[]
Makie.update_cam!(scene, target)
return
Expand Down

0 comments on commit 599e860

Please sign in to comment.