From db5e4fc36cdb9cdecadef5f4d65f8223c06f2547 Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Sun, 29 May 2022 13:49:08 +1200 Subject: [PATCH] Fix button position with default divider position --- shared/naturalcrit/splitPane/splitPane.jsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/shared/naturalcrit/splitPane/splitPane.jsx b/shared/naturalcrit/splitPane/splitPane.jsx index 691cf058f..bc7e73905 100644 --- a/shared/naturalcrit/splitPane/splitPane.jsx +++ b/shared/naturalcrit/splitPane/splitPane.jsx @@ -29,6 +29,10 @@ const SplitPane = createClass({ userSetDividerPos : dividerPos, windowWidth : window.innerWidth }); + } else { + this.setState({ + currentDividerPos : window.innerWidth / 2 + }); } window.addEventListener('resize', this.handleWindowResize); }, @@ -83,7 +87,8 @@ const SplitPane = createClass({ window.getSelection().removeAllRanges(); } }, -*/ + */ + renderDivider : function(){ return <>