basictable 2.0.4 → 2.0.6
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/package.json +3 -3
- package/src/js/basictable.js +5 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "basictable",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.6",
|
|
4
4
|
"description": "Basic Table jQuery and Vanilla JS plugin for simple responsive tables.",
|
|
5
5
|
"main": "jquery.basictable.js",
|
|
6
6
|
"scripts": {
|
|
@@ -26,9 +26,9 @@
|
|
|
26
26
|
"url": "https://github.com/jerrylow/basictable/issues"
|
|
27
27
|
},
|
|
28
28
|
"homepage": "https://github.com/jerrylow/basictable#readme",
|
|
29
|
-
"
|
|
29
|
+
"devDependencies": {
|
|
30
30
|
"beautify-css": "^1.0.0",
|
|
31
|
-
"standard": "^
|
|
31
|
+
"standard": "^17.1.2",
|
|
32
32
|
"terser": "^5.5.1",
|
|
33
33
|
"uglifycss": "^0.0.29"
|
|
34
34
|
},
|
package/src/js/basictable.js
CHANGED
|
@@ -126,11 +126,11 @@ class basictable { // eslint-disable-line no-unused-vars
|
|
|
126
126
|
}
|
|
127
127
|
|
|
128
128
|
_getInnerWidth (el) {
|
|
129
|
-
const computedStyle = window.getComputedStyle(el)
|
|
130
|
-
const border = parseFloat(computedStyle.borderLeft) + parseFloat(computedStyle.borderRight)
|
|
131
|
-
const padding = parseFloat(computedStyle.paddingLeft) + parseFloat(computedStyle.paddingRight)
|
|
129
|
+
const computedStyle = window.getComputedStyle(el)
|
|
130
|
+
const border = parseFloat(computedStyle.borderLeft) + parseFloat(computedStyle.borderRight)
|
|
131
|
+
const padding = parseFloat(computedStyle.paddingLeft) + parseFloat(computedStyle.paddingRight)
|
|
132
132
|
|
|
133
|
-
return parseFloat(computedStyle.width) - (border + padding)
|
|
133
|
+
return parseFloat(computedStyle.width) - (border + padding)
|
|
134
134
|
}
|
|
135
135
|
|
|
136
136
|
_check (table) {
|
|
@@ -138,7 +138,7 @@ class basictable { // eslint-disable-line no-unused-vars
|
|
|
138
138
|
// responsive is turned off.
|
|
139
139
|
if (!this.options.forceResponsive) {
|
|
140
140
|
table.classList.remove('bt')
|
|
141
|
-
const tableSize = table.offsetWidth
|
|
141
|
+
const tableSize = table.offsetWidth
|
|
142
142
|
|
|
143
143
|
if (tableSize > this._getInnerWidth(table.parentElement)) {
|
|
144
144
|
this._start(table)
|