govuk_publishing_components 21.66.0 → 21.66.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 903043f0922348d52d8bd086a8450bc950b4cef41f9698981fbac4ff94e969e0
4
- data.tar.gz: 68eec1602de4314d9072e1cc36d746f264477d07ca26ca10fa5e4b7053837694
3
+ metadata.gz: 9bf9f7485f017d85bcc7a495d8589ef344ec7e942536e9b0e1e572b37e36c919
4
+ data.tar.gz: afab329a86f75e95926103ec746038e0e2ac6967b756985efc0d39f86a2c0b35
5
5
  SHA512:
6
- metadata.gz: 0e640b5131f343fac9d48ae517be2b5c5edcff7c90bd3599eabda72750c11535f9aafcf22c85e703097a547b487031f385815b6b9db427914432e4bd45aa4b3e
7
- data.tar.gz: 6de32726b845f9a80c16bd782d9afa20d9e18f3bbe85af6823bed4d9a5b250e481d45504c3f28ab72b23de5263ea54e5a7de2a075e3b7e1efec985c7e34e2370
6
+ metadata.gz: 1b95b4802e4e9dbe071e1c9c24b8994cc868df9f1f949d2e6b64d78cd34ed4bc6d3db8ca742fc57c08236efd258418d91edeb85915f02c26b4658c6680e410fb
7
+ data.tar.gz: 56e3f6bcddaf5fa925016960767017683b2ea100bdac40141b2440335ca3f1d3435658c4e11024ef19cd5d4beeefa897154ab86907fd25205c44438dc11df1dc
@@ -396,14 +396,14 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
396
396
  var $cell = cells[i]
397
397
  var cellVal = parseFloat(this.utils.stripValue($cell.innerText), 10)
398
398
  var $cellSpan = $cell.querySelector('span')
399
- var spanWidth = parseFloat(window.getComputedStyle($cellSpan, null).width.replace('px', '')) + 10 // +10 just for extra padding
400
- var cellWidth = parseFloat(window.getComputedStyle($cell, null).width.replace('px', ''))
399
+ var spanWidth = $cell.querySelector('span').offsetWidth + 5 // +5 just for extra padding
400
+ var cellWidth = $cell.offsetWidth
401
401
 
402
402
  if (!this.options.stacked) {
403
403
  // if it's 0, it is effectively outdented
404
404
  if (cellVal === 0) { $cell.classList.add('mc-bar-outdented') }
405
405
 
406
- if ((this.options.autoOutdent && spanWidth > cellWidth) || this.options.outdentAll) {
406
+ if ((this.options.autoOutdent && spanWidth >= cellWidth) || this.options.outdentAll) {
407
407
  $cell.classList.add('mc-bar-outdented')
408
408
  $cellSpan.style.marginLeft = '100%'
409
409
  $cellSpan.style.display = 'inline-block'
@@ -188,6 +188,12 @@ examples:
188
188
  <tr>
189
189
  <td>row 2</td><td>15</td>
190
190
  </tr>
191
+ <tr>
192
+ <td>row 3</td><td>2</td>
193
+ </tr>
194
+ <tr>
195
+ <td>row 4</td><td>48</td>
196
+ </tr>
191
197
  </tbody>
192
198
  </table>
193
199
  chart_with_colours:
@@ -1,3 +1,3 @@
1
1
  module GovukPublishingComponents
2
- VERSION = "21.66.0".freeze
2
+ VERSION = "21.66.1".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: govuk_publishing_components
3
3
  version: !ruby/object:Gem::Version
4
- version: 21.66.0
4
+ version: 21.66.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - GOV.UK Dev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-09-15 00:00:00.000000000 Z
11
+ date: 2020-09-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: govuk_app_config