Skip to content

Commit

Permalink
Fontsize persisted in localstorage
Browse files Browse the repository at this point in the history
  • Loading branch information
fatih-erikli committed Dec 15, 2023
1 parent 07d3365 commit 1dd09e6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/fontra/views/editor/panel-reference-font.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
},
});

Expand Down Expand Up @@ -591,6 +592,7 @@ export default class ReferenceFontPanel extends Panel {

this.controller = new ObservableController({
languageCode: "",
fontSize: 14,
selectedFontIndex: -1,
fontList: [],
charOverride: "",
Expand Down

0 comments on commit 1dd09e6

Please sign in to comment.