diff options
| author | randym <[email protected]> | 2017-04-01 17:51:54 +0900 |
|---|---|---|
| committer | randym <[email protected]> | 2017-04-01 17:51:54 +0900 |
| commit | 65eab9445cc965dfd1f4d9665661b545e7f0d747 (patch) | |
| tree | b53bc406abcd992aa11c5be8d9bc2b5cd2716eb9 | |
| parent | 21d119f51f91c14fc912e56908280678dce3515e (diff) | |
| download | caxlsx-65eab9445cc965dfd1f4d9665661b545e7f0d747.tar.gz caxlsx-65eab9445cc965dfd1f4d9665661b545e7f0d747.zip | |
fix(two_cell_anchor): spat arguments for start_at, end_at when they are in the options hash
| -rw-r--r-- | lib/axlsx/drawing/two_cell_anchor.rb | 7 | ||||
| -rw-r--r-- | lib/axlsx/util/string.rb | 7 |
2 files changed, 6 insertions, 8 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 diff --git a/lib/axlsx/util/string.rb b/lib/axlsx/util/string.rb deleted file mode 100644 index 8def6e5b..00000000 --- a/lib/axlsx/util/string.rb +++ /dev/null @@ -1,7 +0,0 @@ -unless String.method_defined? :prepend - class String - def prepend(other_str) - insert(0, other_str) - end - end -end
\ No newline at end of file |
