mirror of
https://github.com/outline/outline.git
synced 2026-06-13 11:25:03 +03:00
fix: Image and video resize calculation
This commit is contained in:
@@ -507,12 +507,7 @@ class DocumentScene extends React.Component<Props> {
|
||||
onSave={this.onSave}
|
||||
headings={this.headings}
|
||||
/>
|
||||
<MeasuredContainer
|
||||
as={Main}
|
||||
name="document"
|
||||
fullWidth={document.fullWidth}
|
||||
tocPosition={tocPos}
|
||||
>
|
||||
<Main fullWidth={document.fullWidth} tocPosition={tocPos}>
|
||||
<React.Suspense
|
||||
fallback={
|
||||
<EditorContainer
|
||||
@@ -542,7 +537,9 @@ class DocumentScene extends React.Component<Props> {
|
||||
<Contents headings={this.headings} />
|
||||
</ContentsContainer>
|
||||
)}
|
||||
<EditorContainer
|
||||
<MeasuredContainer
|
||||
name="document"
|
||||
as={EditorContainer}
|
||||
docFullWidth={document.fullWidth}
|
||||
showContents={showContents}
|
||||
tocPosition={tocPos}
|
||||
@@ -595,11 +592,11 @@ class DocumentScene extends React.Component<Props> {
|
||||
</>
|
||||
)}
|
||||
</Editor>
|
||||
</EditorContainer>
|
||||
</MeasuredContainer>
|
||||
</>
|
||||
)}
|
||||
</React.Suspense>
|
||||
</MeasuredContainer>
|
||||
</Main>
|
||||
{isShare &&
|
||||
!parseDomain(window.location.origin).custom &&
|
||||
!auth.user && (
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import * as React from "react";
|
||||
import { EditorStyleHelper } from "../../styles/EditorStyleHelper";
|
||||
|
||||
type DragDirection = "left" | "right";
|
||||
|
||||
@@ -113,7 +114,8 @@ export default function useDragResize(props: Params): ReturnValue {
|
||||
getComputedStyle(props.ref.current).getPropertyValue(
|
||||
"--document-width"
|
||||
)
|
||||
)
|
||||
) -
|
||||
EditorStyleHelper.padding * 2
|
||||
: Infinity;
|
||||
setMaxWidth(max);
|
||||
setSizeAtDragStart({
|
||||
|
||||
Reference in New Issue
Block a user