Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/table-jump.jl
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ function realize(tbl::Table, drawctx::ParentDrawContext)
for i in 1:m, j in 1:n
if length(tbl.children[i, j]) == 1
ctx = copy(tbl.children[i, j][1])
feasible == feasible && issatisfied(ctx, w_solution[j], h_solution[i])
feasible = feasible && issatisfied(ctx, w_solution[j], h_solution[i])
ctx.box = BoundingBox(
x_solution[j]*mm, y_solution[i]*mm,
w_solution[j]*mm, h_solution[i]*mm)
Expand All @@ -159,7 +159,7 @@ function realize(tbl::Table, drawctx::ParentDrawContext)
for (l, (i, j, k)) in enumerate(c_indexes)
if round(c_solution[l]) == 1
ctx = copy(tbl.children[i, j][k])
feasible == feasible && issatisfied(ctx, w_solution[j], h_solution[i])
feasible = feasible && issatisfied(ctx, w_solution[j], h_solution[i])
ctx.box = BoundingBox(
x_solution[j]*mm, y_solution[i]*mm,
w_solution[j]*mm, h_solution[i]*mm)
Expand Down
4 changes: 2 additions & 2 deletions src/table.jl
Original file line number Diff line number Diff line change
Expand Up @@ -330,14 +330,14 @@ function realize_brute_force(tbl::Table, drawctx::ParentDrawContext)
idx = optimal_choice[(j-1)*m + i]
ctx = copy(tbl.children[i, j][idx])
end
feasible == feasible && issatisfied(ctx, w_solution[j], h_solution[i])
feasible = feasible && issatisfied(ctx, w_solution[j], h_solution[i])
ctx.box = BoundingBox(
x_solution[j]*mm, y_solution[i]*mm,
w_solution[j]*mm, h_solution[i]*mm)
compose!(root, ctx)
end

feasible || warn("Graphic may not be drawn correctly at the given size.")
feasible || @warn "Graphic may not be drawn correctly at the given size."

return root
end
Expand Down