From 2207c9b9f205126d947db0d3a0a21a43d2e82572 Mon Sep 17 00:00:00 2001 From: Tim Date: Sun, 8 May 2022 19:20:38 -0400 Subject: [PATCH] Backporting NKMjs updates --- app/js/data/infos.js | 2 +- app/js/editors/inspectors/glyph-list-inspector.js | 8 ++++---- app/js/widgets/glyph-preview-group.js | 5 ++--- app/js/widgets/layer-control.js | 2 +- app/js/widgets/layers-view.js | 8 +++++++- app/src-style/default/_variables.scss | 2 +- app/src-style/default/global-host.scss | 2 +- package.json | 6 +++--- pkg.cc | 8 ++++---- 9 files changed, 24 insertions(+), 19 deletions(-) diff --git a/app/js/data/infos.js b/app/js/data/infos.js index 061104f..ef3b2c3 100644 --- a/app/js/data/infos.js +++ b/app/js/data/infos.js @@ -11,7 +11,7 @@ class INFOS { return IDS.GetInfos(p_id) || IDS_EXT.GetInfos(p_id) || IDS_PREFS.GetInfos(p_id) || null; } - static LAYER_LIMIT = 20; + static LAYER_LIMIT = 50; static get MARK_COLOR() { let col = nkm.env.APP.PGet(IDS_PREFS.MARK_COLOR, `FF00FF`); diff --git a/app/js/editors/inspectors/glyph-list-inspector.js b/app/js/editors/inspectors/glyph-list-inspector.js index 9b743c3..59667eb 100644 --- a/app/js/editors/inspectors/glyph-list-inspector.js +++ b/app/js/editors/inspectors/glyph-list-inspector.js @@ -334,11 +334,11 @@ class GlyphListInspector extends base { origin: ui.ANCHORING.RIGHT, keepWithinScreen: true, static: true, - content: mkfWidgets.GlyphPreview + content: mkfWidgets.GlyphPreviewGroup }); - this._popoutPreview.content.data = atop; - this._popoutPreview.content.glyphInfos = atop ? atop.glyph.unicodeInfos : null; + this._popoutPreview.content.data = this._data ? this._data.analytics.existing : null; + //this._popoutPreview.content.glyphInfos = atop ? atop.glyph.unicodeInfos : null; //this._UpdatePreviewLayer(); } @@ -356,7 +356,7 @@ class GlyphListInspector extends base { _UpdatePreviewLayer(p_layer) { this._glyphPreview.glyphLayer = this._data.selectedLayer; - if (this._popoutPreview) { this._popoutPreview.content.glyphLayer = this._data.selectedLayer; } + //if (this._popoutPreview) { this._popoutPreview.content.glyphLayer = this._data.selectedLayer; } } //#endregion diff --git a/app/js/widgets/glyph-preview-group.js b/app/js/widgets/glyph-preview-group.js index 61ff531..6520d1e 100644 --- a/app/js/widgets/glyph-preview-group.js +++ b/app/js/widgets/glyph-preview-group.js @@ -30,7 +30,7 @@ class GlyphPreviewGroup extends base { static _Style() { return nkm.style.Extends({ ':host': { - //'@': ['fade-in'], + '@': ['fade-in'], 'position': 'relative', 'grid-gap': `10px`, 'display': 'grid', @@ -38,7 +38,6 @@ class GlyphPreviewGroup extends base { 'grid-template-rows': 'auto auto', 'justify-content': `center`, 'align-content': `space-between`, //center - 'margin-bottom': '5px', }, '.box': { 'position': 'relative', @@ -76,7 +75,7 @@ class GlyphPreviewGroup extends base { } - set glyphLayer(p_value) { this._glyphRenderer.layer = p_value; } + set glyphLayer(p_value) { } _OnDataChanged(p_oldData) { super._OnDataChanged(p_oldData); diff --git a/app/js/widgets/layer-control.js b/app/js/widgets/layer-control.js index 743ecfb..00f4bf1 100644 --- a/app/js/widgets/layer-control.js +++ b/app/js/widgets/layer-control.js @@ -50,7 +50,7 @@ class LayerControl extends base { static _Style() { return nkm.style.Extends({ ':host': { - '@': [`fade-in`], + //'@': [`fade-in`], 'padding': '5px', 'margin-bottom': '5px', 'background-color': `rgba(127,127,127,0.25)`, diff --git a/app/js/widgets/layers-view.js b/app/js/widgets/layers-view.js index 9777091..a074bcb 100644 --- a/app/js/widgets/layers-view.js +++ b/app/js/widgets/layers-view.js @@ -90,6 +90,9 @@ class LayersView extends base { //'background-color':`rgba(19,19,19,0.25)`, 'border-radius': `3px` }, + '.item.collapsed': { + 'height': '38px' + }, '.item': { 'flex': '0 1 auto', 'margin': `3px`, @@ -186,7 +189,8 @@ class LayersView extends base { return; } this._data._layers.ForEach(lyr => { this._OnLayerAdded(this._data, lyr); }); - this._RefreshLayerOrder(); + this._AttachFragment(); + //this._RefreshLayerOrder(); } _OnLayerAdded(p_variant, p_layer) { @@ -207,8 +211,10 @@ class LayersView extends base { } _AttachFragment() { + this._delayedAttachFragment.Cancel(); if (!this._fragment) { return; } ui.dom.Attach(this._fragment, this._listCtnr); + this._fragment = null; this._RefreshLayerOrder(); } diff --git a/app/src-style/default/_variables.scss b/app/src-style/default/_variables.scss index 4bacd3c..e8bbbff 100644 --- a/app/src-style/default/_variables.scss +++ b/app/src-style/default/_variables.scss @@ -37,7 +37,7 @@ $varname_col_cta: '--col-cta'; $varname_col_input_bg: '--col-input-bg'; -$transition_opacity: opacity 0.15s ease; +$transition_opacity: opacity 0.1s ease; /////////// /* Sizes */ diff --git a/app/src-style/default/global-host.scss b/app/src-style/default/global-host.scss index e96e90a..37a2a7f 100644 --- a/app/src-style/default/global-host.scss +++ b/app/src-style/default/global-host.scss @@ -19,7 +19,7 @@ } :host{ - //transition: $transition_opacity; + transition: $transition_opacity; } :host(:not(.unpainted)){ diff --git a/package.json b/package.json index 1271c65..a682e48 100644 --- a/package.json +++ b/package.json @@ -1,13 +1,13 @@ { "name": "mkfont", - "version": "0.8.2", + "version": "0.8.3", "author": { "name": "Timothé Lapetite", "email": "nebukam@gmail.com" }, "license": "SEE LICENSE IN LICENSE", "dependencies": { - "@nkmjs/core": "^0.3.3", + "@nkmjs/core": "^0.3.4", "svg-path-reverse": "^1.3.0", "svg2ttf": "^6.0.3", "svgo": "^2.8.0", @@ -19,7 +19,7 @@ "processor": "node app/js-unicode/unicode-processor.js" }, "devDependencies": { - "@nkmjs/core-dev": "^0.3.3", + "@nkmjs/core-dev": "^0.3.4", "electron": "^17.1.0" } } \ No newline at end of file diff --git a/pkg.cc b/pkg.cc index 04af466..d9b2c9e 100644 --- a/pkg.cc +++ b/pkg.cc @@ -1,13 +1,13 @@ { "name": "mkfont", - "version": "0.8.2", + "version": "0.8.3", "author": { "name": "Timothé Lapetite", "email": "nebukam@gmail.com" }, "license": "SEE LICENSE IN LICENSE", "dependencies": { - "@nkmjs/core": "^0.3.3", + "@nkmjs/core": "^0.3.4", "svg-path-reverse": "^1.3.0", "svg2ttf": "^6.0.3", "svgo": "^2.8.0", @@ -19,14 +19,14 @@ "processor": "node app/js-unicode/unicode-processor.js" }, "devDependencies": { - "@nkmjs/core-dev": "^0.3.3", + "@nkmjs/core-dev": "^0.3.4", "electron": "^17.1.0" } } { "name": "mkfont", - "version": "0.8.2", + "version": "0.8.3", "author": { "name": "Timothé Lapetite", "email": "nebukam@gmail.com"