Skip to content

Commit

Permalink
Undo glyphNameChangedCallback
Browse files Browse the repository at this point in the history
  • Loading branch information
fatih-erikli committed Aug 29, 2023
1 parent 3f02653 commit e1f969f
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/fontra/views/editor/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -247,9 +247,8 @@ export class EditorController {
"#glyphs-search"
);
this.glyphsSearch.glyphMap = this.fontController.glyphMap;
this.glyphsSearch.addEventListener(
"selectedGlyphNameChanged",
this.glyphNameChangedCallback.bind(this)
this.glyphsSearch.addEventListener("selectedGlyphNameChanged", (event) =>
this.glyphNameChangedCallback(event.detail)
);
}

Expand Down Expand Up @@ -467,12 +466,12 @@ export class EditorController {
this.cleanGlyphsLayers.scaleFactor = 1 / magnification;
}

glyphNameChangedCallback(event) {
if (!event.detail) {
glyphNameChangedCallback(glyphName) {
if (!glyphName) {
return;
}
const codePoint = this.fontController.codePointForGlyph(event.detail);
const glyphInfo = { glyphName: event.detail };
const codePoint = this.fontController.codePointForGlyph();
const glyphInfo = { glyphName };
if (codePoint !== undefined) {
glyphInfo["character"] = getCharFromUnicode(codePoint);
}
Expand Down

0 comments on commit e1f969f

Please sign in to comment.