Logic is corrected, but the JS should probably be rewritten to be more like the WG PageLayout drag and drop so that it isn't so finicky.

This commit is contained in:
Kaleb Murphy 2009-02-13 18:28:52 +00:00
parent 34340e56fb
commit a350398f41
2 changed files with 11 additions and 6 deletions

View file

@ -655,12 +655,11 @@ sub insertObject {
# Figure out what to do by counting the number of elements in the $address array ref
my $count = @{$address};
return if !$count;
# Use splice to rearrange the relevant array of objects..
if ( $count == 1 ) {
splice @{ $self->sections($address) }, sIndex($address) + 1, 0, $object;
splice @{ $self->sections($address) }, sIndex($address) +1, 0, $object;
}
elsif ( $count == 2 ) {
splice @{ $self->questions($address) }, qIndex($address) + 1, 0, $object;