Просмотр исходного кода

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 лет назад
Родитель
Сommit
eb24e8ffe4
Аккаунт пользователя с таким Email не найден

+ 0
- 1
public/index.html Просмотреть файл

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

+ 0
- 4
src/components/App.tsx Просмотреть файл

414
       zenModeEnabled,
414
       zenModeEnabled,
415
       width: canvasDOMWidth,
415
       width: canvasDOMWidth,
416
       height: canvasDOMHeight,
416
       height: canvasDOMHeight,
417
-      offsetTop,
418
-      offsetLeft,
419
       viewModeEnabled,
417
       viewModeEnabled,
420
     } = this.state;
418
     } = this.state;
421
 
419
 
433
         style={{
431
         style={{
434
           width: canvasDOMWidth,
432
           width: canvasDOMWidth,
435
           height: canvasDOMHeight,
433
           height: canvasDOMHeight,
436
-          top: offsetTop,
437
-          left: offsetLeft,
438
         }}
434
         }}
439
       >
435
       >
440
         <LayerUI
436
         <LayerUI

+ 2
- 0
src/css/styles.scss Просмотреть файл

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

+ 9
- 1
src/packages/excalidraw/CHANGELOG.md Просмотреть файл

12
 Please add the latest change on the top under the correct section.
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
 ## Excalidraw API
17
 ## Excalidraw API
18
 
18
 
19
 ### Fixes
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
 - 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).
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 Просмотреть файл

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

Загрузка…
Отмена
Сохранить