From 1b93888da528b1ac66ab362f2a04da4723a75e99 Mon Sep 17 00:00:00 2001 From: hazam Date: Sat, 4 Jan 2020 02:52:47 +0500 Subject: [PATCH] Restore fill style --- src/index.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/index.tsx b/src/index.tsx index 16a7085a..6266e121 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -215,10 +215,10 @@ function renderScene( }); // horizontal scrollbar + context.fillStyle = SCROLLBAR_COLOR; const sceneWidth = canvasWidth + Math.abs(sceneState.scrollX); const scrollBarWidth = (canvasWidth * canvasWidth) / sceneWidth; const scrollBarX = sceneState.scrollX > 0 ? 0 : canvasWidth - scrollBarWidth; - context.fillStyle = SCROLLBAR_COLOR; context.fillRect( scrollBarX + SCROLLBAR_MARGIN, canvasHeight - SCROLLBAR_WIDTH - SCROLLBAR_MARGIN, @@ -231,13 +231,13 @@ function renderScene( const scrollBarHeight = (canvasHeight * canvasHeight) / sceneHeight; const scrollBarY = sceneState.scrollY > 0 ? 0 : canvasHeight - scrollBarHeight; - context.fillStyle = SCROLLBAR_COLOR; context.fillRect( canvasWidth - SCROLLBAR_WIDTH - SCROLLBAR_MARGIN, scrollBarY + SCROLLBAR_MARGIN, SCROLLBAR_WIDTH, scrollBarHeight - SCROLLBAR_WIDTH * 2 ); + context.fillStyle = fillStyle; } function exportAsPNG({ @@ -695,7 +695,7 @@ class App extends React.Component<{}, AppState> { { e.preventDefault(); const { deltaX, deltaY } = e;