Skip to content

Commit

Permalink
Do not use this.sourceLocation
Browse files Browse the repository at this point in the history
  • Loading branch information
ollimeier committed Jan 16, 2025
1 parent bf67078 commit 1338ad1
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/fontra/views/fontoverview/panel-navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,14 +209,14 @@ export class FontOverviewNavigation extends HTMLElement {

this.locationControllerPopup.addKeyListener("value", (event) => {
const fontSourceIdentifier = event.newValue;
this.sourceLocation = {
const sourceLocation = {
...fontSources[fontSourceIdentifier]?.location,
}; // A font may not have any font sources, therefore the ?-check
// TODO: set the sliders controller. The following does not work:
//this.locationControllerSliders.setItem(this.sourceLocation);
// this.locationControllerSliders.setItem(sourceLocation);
this.fontOverviewSettingsController.setItem(
"fontLocationSource",
this.sourceLocation,
sourceLocation,
{ sentFromInput: true }
);
});
Expand All @@ -229,9 +229,7 @@ export class FontOverviewNavigation extends HTMLElement {
this.fontController.axes.axes
);

this.locationControllerSliders = new ObservableController({
...this.sourceLocation,
});
this.locationControllerSliders = new ObservableController({});

const locationElement = html.createDomElement("designspace-location", {
style: `grid-column: 1 / -1;
Expand Down

0 comments on commit 1338ad1

Please sign in to comment.