From 8da311f28a07f075e7d976585e1d88711da330b1 Mon Sep 17 00:00:00 2001 From: Thomas Sparks Date: Wed, 18 Oct 2023 11:34:29 -0700 Subject: [PATCH] Move variables --- webapp/src/app.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/webapp/src/app.tsx b/webapp/src/app.tsx index 04f84fa4a993..049c819393c4 100644 --- a/webapp/src/app.tsx +++ b/webapp/src/app.tsx @@ -152,6 +152,9 @@ export class ProjectView private rootClasses: string[]; private pendingImport: pxt.Util.DeferredPromise; + private tutorialFontIncrement = 0.25; + private tutorialInitialFontSize = 1.125; // rem + private highContrastSubscriber: data.DataSubscriber = { subscriptions: [], onDataChanged: () => { @@ -1535,14 +1538,11 @@ export class ProjectView } } - zoomIncrement = 0.25; // TODO thsparks : move up. - initialFontSize = 1.125; // TODO thsparks : move up. Can this reference the css? - onScaleChanged(oldScale: number, newScale: number) { if (this.isTutorial && oldScale !== newScale) { - const change = newScale > oldScale ? this.zoomIncrement : -this.zoomIncrement; + const change = newScale > oldScale ? this.tutorialFontIncrement : -this.tutorialFontIncrement; if (!this.state.tutorialFontSize) { - this.setState({ tutorialFontSize: this.initialFontSize + change }); + this.setState({ tutorialFontSize: this.tutorialInitialFontSize + change }); } else { this.setState({ tutorialFontSize: this.state.tutorialFontSize + change }); }