Skip to content

Commit

Permalink
Rename func, change arg
Browse files Browse the repository at this point in the history
  • Loading branch information
justvanrossum committed May 20, 2024
1 parent cfec1e5 commit e40dce8
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/fontra/views/editor/panel-designspace-navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -532,9 +532,7 @@ export default class DesignspaceNavigationPanel extends Panel {
const varGlyphController =
await this.sceneModel.getSelectedVariableGlyphController();

const glyphAxes = varGlyphController
? getAxisInfoFromGlyph(varGlyphController)
: [];
const glyphAxes = varGlyphController ? foldNLIAxes(varGlyphController.axes) : [];
this.glyphAxesElement.axes = glyphAxes;
this.glyphAxesAccordionItem.hidden = !varGlyphController;

Expand Down Expand Up @@ -1155,10 +1153,10 @@ function roundComponentOrigins(components) {
});
}

function getAxisInfoFromGlyph(glyph) {
function foldNLIAxes(axes) {
// Fold NLI axes into single axes
const axisInfo = {};
for (const axis of glyph?.axes || []) {
for (const axis of axes || []) {
const baseName = getAxisBaseName(axis.name);
if (axisInfo[baseName]) {
continue;
Expand Down

0 comments on commit e40dce8

Please sign in to comment.