فهرست منبع

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
Aakansha Doshi 5 سال پیش
والد
کامیت
eb24e8ffe4
5فایلهای تغییر یافته به همراه12 افزوده شده و 7 حذف شده
  1. 0 1
      public/index.html
  2. 0 4
      src/components/App.tsx
  3. 2 0
      src/css/styles.scss
  4. 9 1
      src/packages/excalidraw/CHANGELOG.md
  5. 1 1
      src/packages/excalidraw/package.json

+ 0 - 1
public/index.html

@@ -116,7 +116,6 @@
         user-select: none;
         user-select: none;
         width: 100vw;
         width: 100vw;
         height: 100vh;
         height: 100vh;
-        overflow: hidden;
       }
       }
 
 
       .visually-hidden {
       .visually-hidden {

+ 0 - 4
src/components/App.tsx

@@ -414,8 +414,6 @@ class App extends React.Component<ExcalidrawProps, AppState> {
       zenModeEnabled,
       zenModeEnabled,
       width: canvasDOMWidth,
       width: canvasDOMWidth,
       height: canvasDOMHeight,
       height: canvasDOMHeight,
-      offsetTop,
-      offsetLeft,
       viewModeEnabled,
       viewModeEnabled,
     } = this.state;
     } = this.state;
 
 
@@ -433,8 +431,6 @@ class App extends React.Component<ExcalidrawProps, AppState> {
         style={{
         style={{
           width: canvasDOMWidth,
           width: canvasDOMWidth,
           height: canvasDOMHeight,
           height: canvasDOMHeight,
-          top: offsetTop,
-          left: offsetLeft,
         }}
         }}
       >
       >
         <LayerUI
         <LayerUI

+ 2 - 0
src/css/styles.scss

@@ -8,6 +8,8 @@
 }
 }
 
 
 .excalidraw {
 .excalidraw {
+  position: relative;
+  overflow: hidden;
   color: var(--text-primary-color);
   color: var(--text-primary-color);
   display: flex;
   display: flex;
   top: 0;
   top: 0;

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

@@ -12,13 +12,21 @@ The change should be grouped under one of the below section and must contain PR
 Please add the latest change on the top under the correct section.
 Please add the latest change on the top under the correct section.
 -->
 -->
 
 
-## Unreleased
+## 0.4.2
 
 
 ## Excalidraw API
 ## Excalidraw API
 
 
 ### Fixes
 ### Fixes
 
 
+- 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).
 - 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).
 - 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).
+- Rerender UI on `renderFooter` prop change [#3183](https://github.com/excalidraw/excalidraw/pull/3183)
+
+## Excalidraw Library
+
+### Fixes
+
+- Temporarily downgrade browser-fs-access to fix legacy FS API [#3172](https://github.com/excalidraw/excalidraw/pull/3172)
 
 
 ---
 ---
 
 

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

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