From 1dd09e68ad3fb0d90b7417012627f653ce409345 Mon Sep 17 00:00:00 2001 From: Fatih Erikli Date: Fri, 15 Dec 2023 19:36:07 +0300 Subject: [PATCH] Fontsize persisted in localstorage --- src/fontra/views/editor/panel-reference-font.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/fontra/views/editor/panel-reference-font.js b/src/fontra/views/editor/panel-reference-font.js index 80e414045a..ece588b172 100644 --- a/src/fontra/views/editor/panel-reference-font.js +++ b/src/fontra/views/editor/panel-reference-font.js @@ -364,12 +364,13 @@ export default class ReferenceFontPanel extends Panel { ); const rangeSlider = createDomElement("range-slider", { type: "range", - value: 14, + value: this.model.fontSize, minValue: 10, maxValue: 200, step: 0.1, onChangeCallback: (event) => { currentCharacter.style.fontSize = `${event.value}px`; + this.model.fontSize = event.value; }, }); @@ -591,6 +592,7 @@ export default class ReferenceFontPanel extends Panel { this.controller = new ObservableController({ languageCode: "", + fontSize: 14, selectedFontIndex: -1, fontList: [], charOverride: "",