@seafile/sdoc-editor 1.0.198-test1.2 → 1.0.198-test1.3

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.
@@ -1,5 +1,22 @@
1
1
  .sdoc-whiteboard-container {
2
+ position: relative;
2
3
  width: 670px;
3
4
  height: 300px;
4
5
  border: 1px solid #ccc;
5
- }
6
+ }
7
+
8
+ .sodoc-whiteboard-title {
9
+ font-size: 14px;
10
+ color: #333;
11
+ text-align: center;
12
+ margin: 5px;
13
+ width: 670px;
14
+ position: absolute;
15
+ top: 0;
16
+ left: 0%;
17
+ }
18
+
19
+ .sdoc-whiteboard-container .tldraw-editor-container {
20
+ position: absolute !important;
21
+ }
22
+
@@ -23,23 +23,33 @@ const Whiteboard = _ref => {
23
23
  } = element;
24
24
  const whiteboardRef = (0, _react.useRef)();
25
25
  console.log(33, repoID, filePath);
26
- const containerId = `whiteboard-${title}-draw`;
26
+ const containerId = `whiteboard-${title}`;
27
+ // Set default whiteboard readonly as true
28
+ const readOnly = true;
29
+ const handleDoubleClick = () => {
30
+ console.log(3434);
31
+ };
27
32
  (0, _react.useEffect)(() => {
28
33
  const eventBus = _eventBus.default.getInstance();
29
34
  eventBus.dispatch(_constants.EXTERNAL_EVENT.TLDRAW_EDITOR, {
30
35
  containerId,
31
36
  props: {
32
37
  filePath,
33
- repoID
38
+ repoID,
39
+ readOnly
34
40
  }
35
41
  });
36
- console.log('dispatch', containerId);
37
42
  }, [filePath, repoID]);
38
43
  return /*#__PURE__*/_react.default.createElement("div", {
39
- id: containerId,
40
44
  className: "sdoc-whiteboard-container",
41
- ref: whiteboardRef
42
- });
45
+ ref: whiteboardRef,
46
+ onDoubleClick: handleDoubleClick
47
+ }, /*#__PURE__*/_react.default.createElement("div", {
48
+ className: "sodoc-whiteboard-title"
49
+ }, title), /*#__PURE__*/_react.default.createElement("div", {
50
+ id: containerId,
51
+ className: "sdoc-whiteboard-wrapper"
52
+ }));
43
53
  };
44
54
  function renderWhiteboard(props, editor) {
45
55
  const {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seafile/sdoc-editor",
3
- "version": "1.0.198-test1.2",
3
+ "version": "1.0.198-test1.3",
4
4
  "private": false,
5
5
  "description": "This is a sdoc editor",
6
6
  "main": "dist/index.js",