summaryrefslogtreecommitdiff
path: root/lib/GridFiller/Chooser/Smarter.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/GridFiller/Chooser/Smarter.pm')
-rw-r--r--lib/GridFiller/Chooser/Smarter.pm10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/GridFiller/Chooser/Smarter.pm b/lib/GridFiller/Chooser/Smarter.pm
index 0abd088..16ed0b0 100644
--- a/lib/GridFiller/Chooser/Smarter.pm
+++ b/lib/GridFiller/Chooser/Smarter.pm
@@ -14,13 +14,17 @@ sub maxfirst {
sub find_place_for {
my ($self,$word) = @_;
- my $length = $self->length->($word);
-
- $self->log->debug("looking for $length of space");
my @candidates;
+ my $length = $self->length->($word,$HORIZONTAL);
+ $self->log->debug("looking for $length of horizontal space");
+
push @candidates, $self->_find_places_horiz($length);
+
+ $length = $self->length->($word,$VERTICAL);
+ $self->log->debug("looking for $length of vertical space");
+
push @candidates, $self->_find_places_vert($length);
return unless @candidates;