tntd 1.4.12 → 1.4.13
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/components/Ellipsis/index.js +5 -2
- package/dist/stats.json +92 -92
- package/dist/tntd.js +1 -1
- package/es/Ellipsis/index.js +6 -1
- package/lib/Ellipsis/index.js +6 -1
- package/package.json +1 -1
package/es/Ellipsis/index.js
CHANGED
|
@@ -32,7 +32,12 @@ import './index.less';
|
|
|
32
32
|
var tolerance = 0; // In px. Depends on the font you are using
|
|
33
33
|
|
|
34
34
|
var isEllipsisActive = function isEllipsisActive(e) {
|
|
35
|
-
|
|
35
|
+
if (e.offsetWidth === e.scrollWidth && e.offsetHeight === e.scrollHeight) {
|
|
36
|
+
var cName = 'overflow';
|
|
37
|
+
e.parentNode.className = e.parentNode.className.replace(new RegExp('(\\s|^)' + cName + '(\\s|$)'), ' ');
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
return e.offsetWidth + tolerance < e.scrollWidth || e.offsetHeight < e.scrollHeight;
|
|
36
41
|
};
|
|
37
42
|
|
|
38
43
|
export default (function (props) {
|
package/lib/Ellipsis/index.js
CHANGED
|
@@ -44,7 +44,12 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
44
44
|
var tolerance = 0; // In px. Depends on the font you are using
|
|
45
45
|
|
|
46
46
|
var isEllipsisActive = function isEllipsisActive(e) {
|
|
47
|
-
|
|
47
|
+
if (e.offsetWidth === e.scrollWidth && e.offsetHeight === e.scrollHeight) {
|
|
48
|
+
var cName = 'overflow';
|
|
49
|
+
e.parentNode.className = e.parentNode.className.replace(new RegExp('(\\s|^)' + cName + '(\\s|$)'), ' ');
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
return e.offsetWidth + tolerance < e.scrollWidth || e.offsetHeight < e.scrollHeight;
|
|
48
53
|
};
|
|
49
54
|
|
|
50
55
|
var _default = function _default(props) {
|