svg_drawer 1.2.0 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3ceac63b9d8ea76c14839b59bbc2ed3b6f850231
4
- data.tar.gz: cfbf467db61ffc9aa75543b84e3c90c662ad5350
3
+ metadata.gz: e20b212c8dbf5477c1958ababd22b93d25fef505
4
+ data.tar.gz: 38f8d9d0dd4784aa176443009a3130f2da2f1518
5
5
  SHA512:
6
- metadata.gz: e1978a112282787ae1adc5b8c9a954062cbb2ef93b617ed0694ec3439f0a0b2144b0d5924c409050a0ba75a75a24acc046c11cf02b2d534b23fb8dbe95d359e1
7
- data.tar.gz: 26030034faf70f4d5d13e1144ea905d469d3d4f0855b82979b1c86d763485c1ad2df3e851ca7a3a410f5b6f6f7013a3bb78c93b71f3d605471fc10cfc7f04699
6
+ metadata.gz: 95b7f567b0d5f3b2b624c9978ae699812d65af2e5e469c70fb89ec39873550936762a6801f584a6fa5923d709af719acadf3e1603b4dc1bd506e36a7c76ad5d1
7
+ data.tar.gz: c20c30a31b676d3d091401f88228ae43a693701ccc1f97c94f2fc90d1343c2a4e47d4d2a1541c694a297a91b7392a3907c750ea7e96e9cbc307cd4f31b266c28
@@ -8,6 +8,7 @@ module SvgDrawer
8
8
  text_align: 'left',
9
9
  text_valign: 'bottom',
10
10
  line_height: 1,
11
+ wrap: true,
11
12
  wrap_policy: 'normal',
12
13
  word_pattern: /[[:word:]]+[^[:word:]]\s?(?![^[:word:]])|[[:word:]]+|[^[:word:]]/,
13
14
  overflow: false,
@@ -33,7 +34,7 @@ module SvgDrawer
33
34
  def height
34
35
  return @height if @height
35
36
  ensure_complete!
36
- @height = param(:overflow) ?
37
+ @height = param(:overflow) || !param(:wrap) ?
37
38
  param(:height, calculate_height).to_d :
38
39
  [param(:height, 0), calculate_height].max.to_d
39
40
  end
@@ -104,7 +105,7 @@ module SvgDrawer
104
105
  end
105
106
 
106
107
  def lines
107
- return [@text] if param(:overflow)
108
+ return [@text] if param(:overflow) || !param(:wrap)
108
109
  txt = param(:truncate) ?
109
110
  Utils::Text.truncate(@text, chars_per_line, param(:truncate_with)) :
110
111
  @text
@@ -1,3 +1,3 @@
1
1
  module SvgDrawer
2
- VERSION = '1.2.0'
2
+ VERSION = '1.2.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: svg_drawer
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Simeon Manolov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-04-19 00:00:00.000000000 Z
11
+ date: 2018-05-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rasem