Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/excalidraw/excalidraw
Browse files Browse the repository at this point in the history
  • Loading branch information
dwelle committed Jun 22, 2023
2 parents 711814a + 8dfa2a9 commit e03b600
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 13 deletions.
6 changes: 3 additions & 3 deletions src/charts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ const commonProps = {
locked: false,
} as const;

const getChartDimentions = (spreadsheet: Spreadsheet) => {
const getChartDimensions = (spreadsheet: Spreadsheet) => {
const chartWidth =
(BAR_WIDTH + BAR_GAP) * spreadsheet.values.length + BAR_GAP;
const chartHeight = BAR_HEIGHT + BAR_GAP * 2;
Expand Down Expand Up @@ -250,7 +250,7 @@ const chartLines = (
groupId: string,
backgroundColor: string,
): ChartElements => {
const { chartWidth, chartHeight } = getChartDimentions(spreadsheet);
const { chartWidth, chartHeight } = getChartDimensions(spreadsheet);
const xLine = newLinearElement({
backgroundColor,
groupIds: [groupId],
Expand Down Expand Up @@ -313,7 +313,7 @@ const chartBaseElements = (
backgroundColor: string,
debug?: boolean,
): ChartElements => {
const { chartWidth, chartHeight } = getChartDimentions(spreadsheet);
const { chartWidth, chartHeight } = getChartDimensions(spreadsheet);

const title = spreadsheet.title
? newTextElement({
Expand Down
2 changes: 1 addition & 1 deletion src/components/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1806,7 +1806,7 @@ class App extends React.Component<AppProps, AppState> {
theme: this.state.theme,
imageCache: this.imageCache,
isExporting: false,
renderScrollbars: !this.device.isMobile,
renderScrollbars: false,
},
callback: ({ atLeastOneVisibleElement, scrollBars }) => {
if (scrollBars) {
Expand Down
5 changes: 5 additions & 0 deletions src/css/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@
--zIndex-modal: 1000;
--zIndex-popup: 1001;
--zIndex-toast: 999999;

--sab: env(safe-area-inset-bottom);
--sal: env(safe-area-inset-left);
--sar: env(safe-area-inset-right);
--sat: env(safe-area-inset-top);
}

.excalidraw {
Expand Down
4 changes: 0 additions & 4 deletions src/css/theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@
--popup-secondary-bg-color: #{$oc-gray-1};
--popup-text-color: #{$oc-black};
--popup-text-inverted-color: #{$oc-white};
--sab: env(safe-area-inset-bottom);
--sal: env(safe-area-inset-left);
--sar: env(safe-area-inset-right);
--sat: env(safe-area-inset-top);
--select-highlight-color: #{$oc-blue-5};
--shadow-island: 0px 7px 14px rgba(0, 0, 0, 0.05),
0px 0px 3.12708px rgba(0, 0, 0, 0.0798),
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/renderScene.ts
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ export const _renderScene = ({
return { atLeastOneVisibleElement: false };
}
const {
renderScrollbars = true,
renderScrollbars = false,
renderSelection = true,
renderGrid = true,
isExporting,
Expand Down
8 changes: 4 additions & 4 deletions src/scene/scrollbars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ export const getScrollBars = (
const viewportHeightDiff = viewportHeight - viewportHeightWithZoom;

const safeArea = {
top: parseInt(getGlobalCSSVariable("sat")),
bottom: parseInt(getGlobalCSSVariable("sab")),
left: parseInt(getGlobalCSSVariable("sal")),
right: parseInt(getGlobalCSSVariable("sar")),
top: parseInt(getGlobalCSSVariable("sat")) || 0,
bottom: parseInt(getGlobalCSSVariable("sab")) || 0,
left: parseInt(getGlobalCSSVariable("sal")) || 0,
right: parseInt(getGlobalCSSVariable("sar")) || 0,
};

const isRTL = getLanguage().rtl;
Expand Down

0 comments on commit e03b600

Please sign in to comment.