Browse Source

fix: Wrap excalidraw in position relative & hide scrollbars in zen mode (#3174)

* fix: wrap excalidraw in position relative so that host need not add it explicitly to fix positioning when non zero offsets

* patch version

* Hide scrollbars on excalidraw container

* remove overflow hidden from index.html since its handled in excalidraw container

* review fix

* update changelog
vanilla_orig
Aakansha Doshi 4 years ago
parent
commit
eb24e8ffe4
No account linked to committer's email address

+ 0
- 1
public/index.html View File

@@ -116,7 +116,6 @@
116 116
         user-select: none;
117 117
         width: 100vw;
118 118
         height: 100vh;
119
-        overflow: hidden;
120 119
       }
121 120
 
122 121
       .visually-hidden {

+ 0
- 4
src/components/App.tsx View File

@@ -414,8 +414,6 @@ class App extends React.Component<ExcalidrawProps, AppState> {
414 414
       zenModeEnabled,
415 415
       width: canvasDOMWidth,
416 416
       height: canvasDOMHeight,
417
-      offsetTop,
418
-      offsetLeft,
419 417
       viewModeEnabled,
420 418
     } = this.state;
421 419
 
@@ -433,8 +431,6 @@ class App extends React.Component<ExcalidrawProps, AppState> {
433 431
         style={{
434 432
           width: canvasDOMWidth,
435 433
           height: canvasDOMHeight,
436
-          top: offsetTop,
437
-          left: offsetLeft,
438 434
         }}
439 435
       >
440 436
         <LayerUI

+ 2
- 0
src/css/styles.scss View File

@@ -8,6 +8,8 @@
8 8
 }
9 9
 
10 10
 .excalidraw {
11
+  position: relative;
12
+  overflow: hidden;
11 13
   color: var(--text-primary-color);
12 14
   display: flex;
13 15
   top: 0;

+ 9
- 1
src/packages/excalidraw/CHANGELOG.md View File

@@ -12,13 +12,21 @@ The change should be grouped under one of the below section and must contain PR
12 12
 Please add the latest change on the top under the correct section.
13 13
 -->
14 14
 
15
-## Unreleased
15
+## 0.4.2
16 16
 
17 17
 ## Excalidraw API
18 18
 
19 19
 ### Fixes
20 20
 
21
+- Wrap excalidraw in position relative so host need not do it anymore & hide scrollbars in zen mode [#3174](https://github.com/excalidraw/excalidraw/pull/3174).
21 22
 - Reduce the scroll debounce timeout to `100ms` so `offsets` gets updated faster if changed when container scrolled [#3182](https://github.com/excalidraw/excalidraw/pull/3182).
23
+- Rerender UI on `renderFooter` prop change [#3183](https://github.com/excalidraw/excalidraw/pull/3183)
24
+
25
+## Excalidraw Library
26
+
27
+### Fixes
28
+
29
+- Temporarily downgrade browser-fs-access to fix legacy FS API [#3172](https://github.com/excalidraw/excalidraw/pull/3172)
22 30
 
23 31
 ---
24 32
 

+ 1
- 1
src/packages/excalidraw/package.json View File

@@ -1,6 +1,6 @@
1 1
 {
2 2
   "name": "@excalidraw/excalidraw",
3
-  "version": "0.4.1",
3
+  "version": "0.4.2",
4 4
   "main": "dist/excalidraw.min.js",
5 5
   "files": [
6 6
     "dist/*"

Loading…
Cancel
Save