@danielgindi/dgtable.js 2.0.3 → 2.0.5

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.
package/dist/lib.cjs.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @danielgindi/dgtable.js 2.0.3
2
+ * @danielgindi/dgtable.js 2.0.5
3
3
  * git://github.com/danielgindi/dgtable.js.git
4
4
  */
5
5
  'use strict';
@@ -5992,6 +5992,9 @@ class DGTable {
5992
5992
  const elStyle = getComputedStyle(el);
5993
5993
  const elInnerStyle = getComputedStyle(elInner);
5994
5994
 
5995
+ let rtl = elStyle.float === 'right';
5996
+ let prop = rtl ? 'right' : 'left';
5997
+
5995
5998
  let paddingL = parseFloat(elStyle.paddingLeft) || 0,
5996
5999
  paddingR = parseFloat(elStyle.paddingRight) || 0,
5997
6000
  paddingT = parseFloat(elStyle.paddingTop) || 0,
@@ -6021,7 +6024,7 @@ class DGTable {
6021
6024
  let css = {
6022
6025
  'box-sizing': borderBox ? 'border-box' : 'content-box',
6023
6026
  'width': requiredWidth,
6024
- 'min-height': Math.max(Css_js.getElementHeight(el), parseFloat(elStyle.minHeight) || 0) + 'px',
6027
+ 'min-height': Math.max(Css_js.getElementHeight(el), /%/.test(elStyle.minHeight) ? 0 : parseFloat(elStyle.minHeight) || 0) + 'px',
6025
6028
  'padding-left': paddingL,
6026
6029
  'padding-right': paddingR,
6027
6030
  'padding-top': paddingT,
@@ -6029,7 +6032,7 @@ class DGTable {
6029
6032
  'overflow': 'hidden',
6030
6033
  'position': 'absolute',
6031
6034
  'z-index': '-1',
6032
- 'left': '0',
6035
+ [prop]: '0',
6033
6036
  'top': '0',
6034
6037
  'cursor': elStyle.cursor
6035
6038
  };
@@ -6103,8 +6106,6 @@ class DGTable {
6103
6106
 
6104
6107
  let offset = Css_js.getElementOffset(el);
6105
6108
  let parentOffset = Css_js.getElementOffset(parent);
6106
- let rtl = elStyle.float === 'right';
6107
- let prop = rtl ? 'right' : 'left';
6108
6109
 
6109
6110
  // Handle RTL, go from the other side
6110
6111
  if (rtl) {