summaryrefslogtreecommitdiffhomepage
path: root/lib/axlsx/drawing/two_cell_anchor.rb
diff options
context:
space:
mode:
authorrandym <[email protected]>2017-04-01 17:51:54 +0900
committerrandym <[email protected]>2017-04-01 17:51:54 +0900
commit65eab9445cc965dfd1f4d9665661b545e7f0d747 (patch)
treeb53bc406abcd992aa11c5be8d9bc2b5cd2716eb9 /lib/axlsx/drawing/two_cell_anchor.rb
parent21d119f51f91c14fc912e56908280678dce3515e (diff)
downloadcaxlsx-65eab9445cc965dfd1f4d9665661b545e7f0d747.tar.gz
caxlsx-65eab9445cc965dfd1f4d9665661b545e7f0d747.zip
fix(two_cell_anchor): spat arguments for start_at, end_at when they are in the options hash
Diffstat (limited to 'lib/axlsx/drawing/two_cell_anchor.rb')
-rw-r--r--lib/axlsx/drawing/two_cell_anchor.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/axlsx/drawing/two_cell_anchor.rb b/lib/axlsx/drawing/two_cell_anchor.rb
index b18268f7..d422c0ce 100644
--- a/lib/axlsx/drawing/two_cell_anchor.rb
+++ b/lib/axlsx/drawing/two_cell_anchor.rb
@@ -37,11 +37,16 @@ module Axlsx
drawing.anchors << self
@from, @to = Marker.new, Marker.new(:col => 5, :row=>10)
parse_options options
+
+ # bit of a hack to work around the fact that the coords for start at and end at
+ # are passed in as an array when specified in intialization options - however
+ start_at(*options[:start_at]) if options[:start_at]
+ end_at(*options[:end_at]) if options[:end_at]
end
# sets the col, row attributes for the from marker.
# @note The recommended way to set the start position for graphical
- # objects is directly thru the object.
+ # objects is directly thru the object.
# @see Chart#start_at
def start_at(x, y=nil)
from.coord x, y