@mjhls/mjh-framework 1.0.382 → 1.0.383
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/README.md +1 -1
- package/dist/cjs/index.js +4 -2
- package/dist/esm/index.js +4 -2
- package/package.json +1 -1
package/README.md
CHANGED
package/dist/cjs/index.js
CHANGED
|
@@ -16940,6 +16940,7 @@ var InscreenSensor = function (_React$Component) {
|
|
|
16940
16940
|
|
|
16941
16941
|
_this.checkInside = function () {
|
|
16942
16942
|
var rect = _this.wraperRef.current.getBoundingClientRect();
|
|
16943
|
+
|
|
16943
16944
|
var _this$props$offSetTop = _this.props.offSetTop,
|
|
16944
16945
|
offSetTop = _this$props$offSetTop === undefined ? 0 : _this$props$offSetTop;
|
|
16945
16946
|
var top = rect.top,
|
|
@@ -16947,13 +16948,14 @@ var InscreenSensor = function (_React$Component) {
|
|
|
16947
16948
|
|
|
16948
16949
|
var bottom = top + height;
|
|
16949
16950
|
var viewHeight = window.innerHeight;
|
|
16951
|
+
|
|
16950
16952
|
if (bottom < offSetTop) {
|
|
16951
16953
|
return false;
|
|
16952
16954
|
} else if (top > offSetTop && bottom <= viewHeight) {
|
|
16953
16955
|
return true;
|
|
16954
|
-
} else if (top
|
|
16956
|
+
} else if (top < offSetTop && top <= viewHeight && bottom > viewHeight) {
|
|
16955
16957
|
return 'top';
|
|
16956
|
-
} else if (bottom
|
|
16958
|
+
} else if (top < offSetTop && bottom + offSetTop >= viewHeight) {
|
|
16957
16959
|
return 'bottom';
|
|
16958
16960
|
} else {
|
|
16959
16961
|
return false;
|
package/dist/esm/index.js
CHANGED
|
@@ -16937,6 +16937,7 @@ var InscreenSensor = function (_React$Component) {
|
|
|
16937
16937
|
|
|
16938
16938
|
_this.checkInside = function () {
|
|
16939
16939
|
var rect = _this.wraperRef.current.getBoundingClientRect();
|
|
16940
|
+
|
|
16940
16941
|
var _this$props$offSetTop = _this.props.offSetTop,
|
|
16941
16942
|
offSetTop = _this$props$offSetTop === undefined ? 0 : _this$props$offSetTop;
|
|
16942
16943
|
var top = rect.top,
|
|
@@ -16944,13 +16945,14 @@ var InscreenSensor = function (_React$Component) {
|
|
|
16944
16945
|
|
|
16945
16946
|
var bottom = top + height;
|
|
16946
16947
|
var viewHeight = window.innerHeight;
|
|
16948
|
+
|
|
16947
16949
|
if (bottom < offSetTop) {
|
|
16948
16950
|
return false;
|
|
16949
16951
|
} else if (top > offSetTop && bottom <= viewHeight) {
|
|
16950
16952
|
return true;
|
|
16951
|
-
} else if (top
|
|
16953
|
+
} else if (top < offSetTop && top <= viewHeight && bottom > viewHeight) {
|
|
16952
16954
|
return 'top';
|
|
16953
|
-
} else if (bottom
|
|
16955
|
+
} else if (top < offSetTop && bottom + offSetTop >= viewHeight) {
|
|
16954
16956
|
return 'bottom';
|
|
16955
16957
|
} else {
|
|
16956
16958
|
return false;
|