mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
feat: enforce constrains on setting constrains
This commit is contained in:
parent
485c57fd59
commit
f82363aae9
1 changed files with 5 additions and 2 deletions
|
@ -7661,8 +7661,11 @@ class App extends React.Component<AppProps, AppState> {
|
|||
height === prevState.height &&
|
||||
cursorButton === prevState.cursorButton;
|
||||
|
||||
// If the state hasn't changed or the scroll constraints are not defined, return null
|
||||
if (!scrollConstraints || stateUnchanged) {
|
||||
// If the state hasn't changed and scrollConstraints didn't just get defined, return null
|
||||
if (
|
||||
!scrollConstraints ||
|
||||
(stateUnchanged && (prevState.scrollConstraints || !scrollConstraints))
|
||||
) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue