From 3bf46a00d717d5e991166360bf4a2ece41cc3fbc Mon Sep 17 00:00:00 2001 From: Randy Morgan Date: Mon, 30 Sep 2013 10:44:04 +0900 Subject: Fix image anchor swapping and update readme. --- README.md | 4 +++- examples/example.rb | 12 +++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index cff9a1b1..87f84dd8 100644 --- a/README.md +++ b/README.md @@ -165,7 +165,9 @@ This gem has 100% test coverage using test/unit. To execute tests for this gem, #Change log --------- - ** - - Added smoothing for line charts + - Added Cell#name so you you can quickly create a defined name for a single cell in your workbook. + - Added full book view and sheet state management. This means you can specify how the workbook renders as well as manage sheet visibility. + - Added smoothing management for line charts series - **September.12.13**:2.0.1 - Unpinned rubyzip version - **September.12.13**:2.0.0 diff --git a/examples/example.rb b/examples/example.rb index 8b11cb20..d8519a26 100755 --- a/examples/example.rb +++ b/examples/example.rb @@ -280,13 +280,23 @@ if examples.include? :images wb.add_worksheet(:name => "Image with Hyperlink") do |sheet| img = File.expand_path('../image1.jpeg', __FILE__) # specifying the :hyperlink option will add a hyper link to your image. + # # @note - Numbers does not support this part of the specification. + sheet.add_image(:image_src => img, :noSelect => true, :noMove => true, :hyperlink=>"http://axlsx.blogspot.com") do |image| image.width=720 image.height=666 image.hyperlink.tooltip = "Labeled Link" - image.start_at 2, 2 + image.start_at 0, 0 + end + + # position in block + sheet.add_image(:image_src => img, :noSelect => true, :noMove => true, :hyperlink=>"http://axlsx.blogspot.com") do |image| + image.start_at 22, 14 + image.end_at 23, 17 end + # all in one go + sheet.add_image(:image_src => img, :start_at => [15, 33], :end_at => [20, 37], :noSelect => true, :noMove => true, :hyperlink=>"http://axlsx.blogspot.com") end end #``` -- cgit v1.2.3