@seafile/seafile-editor 1.0.130 → 1.0.132
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.
|
@@ -10,7 +10,8 @@ var _outline = require("../containers/outline");
|
|
|
10
10
|
var _common = require("../utils/common");
|
|
11
11
|
var _eventBus = _interopRequireDefault(require("../utils/event-bus"));
|
|
12
12
|
var _eventTypes = require("../constants/event-types");
|
|
13
|
-
const useContainerStyle = (scrollRef
|
|
13
|
+
const useContainerStyle = function (scrollRef) {
|
|
14
|
+
let isShowOutline = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
14
15
|
const [containerStyle, setContainerStyle] = (0, _react.useState)({});
|
|
15
16
|
|
|
16
17
|
// Adjust article container margin-left value according to isShown of the outline and width of window
|
|
@@ -29,7 +30,7 @@ const useContainerStyle = (scrollRef, isShowOutline) => {
|
|
|
29
30
|
}, [scrollRef]);
|
|
30
31
|
(0, _react.useEffect)(() => {
|
|
31
32
|
if (_common.isMobile) return;
|
|
32
|
-
if (isShowOutline) return;
|
|
33
|
+
if (!isShowOutline) return;
|
|
33
34
|
handleWindowResize();
|
|
34
35
|
window.addEventListener('resize', handleWindowResize);
|
|
35
36
|
const eventBus = _eventBus.default.getInstance();
|