@seafile/seafile-editor 0.3.96 → 0.3.97-test-1
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/css/layout.css
CHANGED
|
@@ -77,6 +77,7 @@
|
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
.seafile-editor-side-panel {
|
|
80
|
+
width: 300px;
|
|
80
81
|
height: 100%;
|
|
81
82
|
background-color: #fff;
|
|
82
83
|
border-left: 1px solid rgb(230,230,221);
|
|
@@ -89,7 +90,7 @@
|
|
|
89
90
|
overflow-x: hidden;
|
|
90
91
|
display: flex;
|
|
91
92
|
flex: 0 0 1;
|
|
92
|
-
position: relative;
|
|
93
|
+
position: relative;
|
|
93
94
|
}
|
|
94
95
|
|
|
95
96
|
.plain-editor-left-panel {
|
|
@@ -8,16 +8,6 @@
|
|
|
8
8
|
position: relative;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
.seafile-editor-resize {
|
|
12
|
-
height: 100%;
|
|
13
|
-
width: 3px;
|
|
14
|
-
background-color: transparent;
|
|
15
|
-
position: absolute;
|
|
16
|
-
top: 0;
|
|
17
|
-
cursor: col-resize;
|
|
18
|
-
z-index: 1;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
11
|
.editor-container {
|
|
22
12
|
/* this container is needed to show the scroll bar */
|
|
23
13
|
height: 100%;
|
|
@@ -97,12 +97,6 @@ var SimpleEditor = /*#__PURE__*/function (_React$Component) {
|
|
|
97
97
|
};
|
|
98
98
|
|
|
99
99
|
_this.initialSidePanel = function () {
|
|
100
|
-
var mainPanelWidth = _this.getCookie('md-editor-main-panel-width');
|
|
101
|
-
|
|
102
|
-
if (mainPanelWidth) _this.setState({
|
|
103
|
-
mainPanelWidth: mainPanelWidth * 1
|
|
104
|
-
});
|
|
105
|
-
|
|
106
100
|
var isShowSidePanel = _this.getCookie('md-editor-show-side-panel');
|
|
107
101
|
|
|
108
102
|
if (isShowSidePanel === 'true') {
|
|
@@ -145,38 +139,6 @@ var SimpleEditor = /*#__PURE__*/function (_React$Component) {
|
|
|
145
139
|
_this.props.openDialogs && _this.props.openDialogs('insert_repo_image');
|
|
146
140
|
};
|
|
147
141
|
|
|
148
|
-
_this.onResizeMouseUp = function (event) {
|
|
149
|
-
if (_this.state.resizeFlag) {
|
|
150
|
-
_this.setState({
|
|
151
|
-
resizeFlag: false
|
|
152
|
-
});
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
_this.setCookie('md-editor-main-panel-width', _this.state.mainPanelWidth);
|
|
156
|
-
};
|
|
157
|
-
|
|
158
|
-
_this.onResizeMouseDown = function (event) {
|
|
159
|
-
_this.setState({
|
|
160
|
-
resizeFlag: true
|
|
161
|
-
});
|
|
162
|
-
};
|
|
163
|
-
|
|
164
|
-
_this.onResizeMouseMove = function (event) {
|
|
165
|
-
var mainPanelWidth = _this.state.mainPanelWidth + event.nativeEvent.movementX / event.view.innerWidth * 100;
|
|
166
|
-
|
|
167
|
-
if (mainPanelWidth >= 82 || mainPanelWidth <= 30) {
|
|
168
|
-
_this.setState({
|
|
169
|
-
resizeFlag: false
|
|
170
|
-
});
|
|
171
|
-
|
|
172
|
-
return;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
_this.setState({
|
|
176
|
-
mainPanelWidth: mainPanelWidth
|
|
177
|
-
});
|
|
178
|
-
};
|
|
179
|
-
|
|
180
142
|
_this.toggleSidePanel = function () {
|
|
181
143
|
if (_this.state.isShowSidePanel) {
|
|
182
144
|
_this.setState({
|
|
@@ -199,7 +161,6 @@ var SimpleEditor = /*#__PURE__*/function (_React$Component) {
|
|
|
199
161
|
|
|
200
162
|
_this.handleCommentOpen = function () {
|
|
201
163
|
_this.setState({
|
|
202
|
-
mainPanelWidth: 70,
|
|
203
164
|
isShowHelpDialog: false
|
|
204
165
|
});
|
|
205
166
|
};
|
|
@@ -371,8 +332,6 @@ var SimpleEditor = /*#__PURE__*/function (_React$Component) {
|
|
|
371
332
|
_this.state = {
|
|
372
333
|
value: props.value,
|
|
373
334
|
leftNavMode: 'files',
|
|
374
|
-
mainPanelWidth: (window.innerWidth - 300) / window.innerWidth * 100,
|
|
375
|
-
resizeFlag: false,
|
|
376
335
|
isShowHelpDialog: false,
|
|
377
336
|
isShowSidePanel: false,
|
|
378
337
|
isShowLinkDialog: false,
|
|
@@ -452,14 +411,9 @@ var SimpleEditor = /*#__PURE__*/function (_React$Component) {
|
|
|
452
411
|
mode = _this$props.mode,
|
|
453
412
|
editorApi = _this$props.editorApi;
|
|
454
413
|
var _this$state2 = this.state,
|
|
455
|
-
mainPanelWidth = _this$state2.mainPanelWidth,
|
|
456
414
|
isShowHelpDialog = _this$state2.isShowHelpDialog,
|
|
457
415
|
isShowSidePanel = _this$state2.isShowSidePanel;
|
|
458
|
-
var
|
|
459
|
-
var mainPanelClass = "seafile-editor-main-panel d-flex align-self-end ".concat(!isShowSidePanel && !isShowHelpDialog ? 'seafile-editor-all-panel' : '');
|
|
460
|
-
var mainPanelStyle = {
|
|
461
|
-
width: isShowSidePanel ? mainPanelWidth + '%' : '100%'
|
|
462
|
-
};
|
|
416
|
+
var mainPanelClass = "seafile-editor-main-panel flex-fill d-flex align-self-end ".concat(!isShowSidePanel && !isShowHelpDialog ? 'seafile-editor-all-panel' : '');
|
|
463
417
|
var editor = this.editor,
|
|
464
418
|
foucsEditor = this.foucsEditor;
|
|
465
419
|
var toolbarStatus = this.editorUtils.getToolbarStatus();
|
|
@@ -488,12 +442,9 @@ var SimpleEditor = /*#__PURE__*/function (_React$Component) {
|
|
|
488
442
|
readOnly: readOnly,
|
|
489
443
|
isShowFormulaDialog: isShowFormulaDialog
|
|
490
444
|
})), /*#__PURE__*/React.createElement("div", {
|
|
491
|
-
className: "seafile-editor-main d-flex"
|
|
492
|
-
onMouseMove: onResizeMove,
|
|
493
|
-
onMouseUp: this.onResizeMouseUp
|
|
445
|
+
className: "seafile-editor-main d-flex"
|
|
494
446
|
}, /*#__PURE__*/React.createElement("div", {
|
|
495
|
-
className: mainPanelClass
|
|
496
|
-
style: mainPanelStyle
|
|
447
|
+
className: mainPanelClass
|
|
497
448
|
}, /*#__PURE__*/React.createElement("div", {
|
|
498
449
|
className: "editor-container align-self-start",
|
|
499
450
|
ref: "editorContainer"
|
|
@@ -531,16 +482,7 @@ var SimpleEditor = /*#__PURE__*/function (_React$Component) {
|
|
|
531
482
|
tableUtils: this.tableUtils,
|
|
532
483
|
contextMenuPosition: this.contextMenuPosition
|
|
533
484
|
})))), !isShowHelpDialog && isShowSidePanel && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
534
|
-
className: "seafile-editor-
|
|
535
|
-
style: {
|
|
536
|
-
right: 100 - mainPanelWidth + '%'
|
|
537
|
-
},
|
|
538
|
-
onMouseDown: this.onResizeMouseDown
|
|
539
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
540
|
-
className: "seafile-editor-side-panel align-self-start",
|
|
541
|
-
style: {
|
|
542
|
-
width: 100 - mainPanelWidth + '%'
|
|
543
|
-
}
|
|
485
|
+
className: "seafile-editor-side-panel align-self-start"
|
|
544
486
|
}, /*#__PURE__*/React.createElement(SidePanel, {
|
|
545
487
|
editor: this,
|
|
546
488
|
document: value,
|