Treesaver/treesaver — Issue #282: Grid scoring bonus
Author: andreacampi
Created: 2012-02-27 14:21:04+00:00
State: open

The default scoring rules are quite reasonable, and it's generally possible to influence them by adding flags and so on.
However there are cases that are more or less impossible to override.

Example scenario: 3 mandatory figures; grid 1 has one tall container, grid 2 has 3 much shorter containers (same width).
Grid number 2 would easily win, with such a high score that it would be impossible to offset with page flags.

I added a grid attribute that add a bonus to the computed score.
This happens **only if** the computed score is non-negative 0, to avoid picking up "invalid" grids.
Also, I'm doing this in ```Grid.prototype.score```, before figures and content have been figured into the score. This should make no difference in practice.