@seafile/sdoc-editor 3.0.89 → 3.0.91
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.
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
position: relative;
|
|
3
3
|
display: flex;
|
|
4
4
|
flex-direction: column;
|
|
5
|
+
resize: vertical;
|
|
5
6
|
}
|
|
6
7
|
|
|
7
8
|
.sdoc-file-view-container .sdoc-file-view-title {
|
|
@@ -18,6 +19,7 @@
|
|
|
18
19
|
position: relative;
|
|
19
20
|
border: 2px solid #eee;
|
|
20
21
|
border-radius: 4px;
|
|
22
|
+
resize: vertical;
|
|
21
23
|
}
|
|
22
24
|
|
|
23
25
|
.sdoc-file-view-container .sdoc-file-view-content.is-selected {
|
|
@@ -26,7 +28,7 @@
|
|
|
26
28
|
}
|
|
27
29
|
|
|
28
30
|
.sdoc-file-view-container .sdoc-file-view-content {
|
|
29
|
-
height:
|
|
31
|
+
height: 400px;
|
|
30
32
|
}
|
|
31
33
|
|
|
32
34
|
.sdoc-file-view-container .sdoc-file-view-content .sea-metadata {
|
|
@@ -50,12 +50,12 @@ var FileViewPlugin = function FileViewPlugin(_ref) {
|
|
|
50
50
|
view_data: {
|
|
51
51
|
wiki_id: data.wiki_id,
|
|
52
52
|
file_view_id: data.file_view_id,
|
|
53
|
-
height: data.height
|
|
54
|
-
width: data.width
|
|
53
|
+
height: data.height
|
|
54
|
+
// width: data.width,
|
|
55
55
|
}
|
|
56
56
|
});
|
|
57
57
|
return viewSettings;
|
|
58
|
-
}, [data.file_view_id, data.height, data.
|
|
58
|
+
}, [data.file_view_id, data.height, data.wiki_id]);
|
|
59
59
|
(0, _react.useEffect)(function () {
|
|
60
60
|
var copyContent = _localStorageUtils["default"].getItem(_constants.RECENT_COPY_CONTENT);
|
|
61
61
|
var wikiId = _context["default"].getSetting('wikiId');
|
|
@@ -102,11 +102,11 @@ var FileViewPlugin = function FileViewPlugin(_ref) {
|
|
|
102
102
|
bottom: bottom
|
|
103
103
|
});
|
|
104
104
|
var style = wrapperElement.style;
|
|
105
|
-
style.width = size.width + 'px';
|
|
105
|
+
// style.width = size.width + 'px';
|
|
106
106
|
style.height = size.height + 'px';
|
|
107
107
|
var _databaseRef$current$ = databaseRef.current.getFileBaseElement(),
|
|
108
108
|
databaseStyle = _databaseRef$current$.style;
|
|
109
|
-
databaseStyle.width = size.width - 4 + 'px';
|
|
109
|
+
// databaseStyle.width = (size.width - 4) + 'px';
|
|
110
110
|
databaseStyle.height = size.height - 4 + 'px';
|
|
111
111
|
setMovingSize(size);
|
|
112
112
|
}, []);
|
|
@@ -122,7 +122,7 @@ var FileViewPlugin = function FileViewPlugin(_ref) {
|
|
|
122
122
|
}]);
|
|
123
123
|
var style = wrapperRef.current.style;
|
|
124
124
|
var newData = (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, element.data), {}, {
|
|
125
|
-
width: parseFloat(style.width),
|
|
125
|
+
// width: parseFloat(style.width),
|
|
126
126
|
height: parseFloat(style.height)
|
|
127
127
|
});
|
|
128
128
|
(0, _helpers.updateFileView)(newData, editor, element);
|
|
@@ -145,11 +145,10 @@ var FileViewPlugin = function FileViewPlugin(_ref) {
|
|
|
145
145
|
}]);
|
|
146
146
|
}, [onMouseMove, onResizeEnd, registerEvent]);
|
|
147
147
|
var style = (0, _react.useMemo)(function () {
|
|
148
|
-
var
|
|
149
|
-
|
|
150
|
-
if (width && height) {
|
|
148
|
+
var height = data.height;
|
|
149
|
+
if (height) {
|
|
151
150
|
return {
|
|
152
|
-
|
|
151
|
+
// width,
|
|
153
152
|
height: height
|
|
154
153
|
};
|
|
155
154
|
}
|
|
@@ -177,7 +176,7 @@ var FileViewPlugin = function FileViewPlugin(_ref) {
|
|
|
177
176
|
onMouseDown: onResizeStart
|
|
178
177
|
}), isResizing && movingSize && /*#__PURE__*/_react["default"].createElement("span", {
|
|
179
178
|
className: "image-size"
|
|
180
|
-
}, /*#__PURE__*/_react["default"].createElement("span", null, t('
|
|
179
|
+
}, /*#__PURE__*/_react["default"].createElement("span", null, t('Height'), ':', parseInt(movingSize.height)))), children);
|
|
181
180
|
};
|
|
182
181
|
var renderFileView = exports.renderFileView = function renderFileView(props) {
|
|
183
182
|
return /*#__PURE__*/_react["default"].createElement(FileViewPlugin, props);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seafile/sdoc-editor",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.91",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "jest",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"@seafile/comment-editor": "~1.0.16",
|
|
21
21
|
"@seafile/print-js": "1.6.6",
|
|
22
22
|
"@seafile/react-image-lightbox": "5.0.4",
|
|
23
|
-
"@seafile/seafile-database": "0.0.
|
|
23
|
+
"@seafile/seafile-database": "0.0.32",
|
|
24
24
|
"@seafile/slate": "0.91.8",
|
|
25
25
|
"@seafile/slate-history": "0.86.2",
|
|
26
26
|
"@seafile/slate-hyperscript": "0.81.7",
|
|
@@ -72,5 +72,5 @@
|
|
|
72
72
|
"publishConfig": {
|
|
73
73
|
"access": "public"
|
|
74
74
|
},
|
|
75
|
-
"gitHead": "
|
|
75
|
+
"gitHead": "4ee85e9c785552e691cadd7e55bb32e89d0b34da"
|
|
76
76
|
}
|