prawn-layout 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/lib/prawn/layout.rb +1 -1
- data/lib/prawn/table.rb +14 -2
- metadata +2 -2
data/Rakefile
CHANGED
data/lib/prawn/layout.rb
CHANGED
data/lib/prawn/table.rb
CHANGED
@@ -167,13 +167,25 @@ module Prawn
|
|
167
167
|
when :center
|
168
168
|
x = (@document.bounds.width - width) / 2.0
|
169
169
|
dy = @document.bounds.absolute_top - @document.y
|
170
|
+
final_pos = nil
|
171
|
+
|
170
172
|
@document.bounding_box [x, @parent_bounds.top], :width => width do
|
171
173
|
@document.move_down(dy)
|
172
174
|
generate_table
|
175
|
+
final_pos = @document.y
|
173
176
|
end
|
177
|
+
|
178
|
+
@document.y = final_pos
|
174
179
|
when Numeric
|
175
|
-
x, y = C(:position), @document.
|
176
|
-
|
180
|
+
x, y = C(:position), @document.cursor
|
181
|
+
final_pos = nil
|
182
|
+
|
183
|
+
@document.bounding_box([x,y], :width => width) do
|
184
|
+
generate_table
|
185
|
+
final_pos = @document.y
|
186
|
+
end
|
187
|
+
|
188
|
+
@document.y = final_pos
|
177
189
|
else
|
178
190
|
generate_table
|
179
191
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: prawn-layout
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gregory Brown
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-11-
|
12
|
+
date: 2009-11-17 00:00:00 -05:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|