Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"test:coverage": "jest --coverage",
"build": "vite build",
"start": "vite",
"preview": "vite preview",
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"setup:chrome": "node scripts/setup-chrome.mjs",
Expand Down
9 changes: 5 additions & 4 deletions src/ui/Library.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import ControlMeter from '../control/ControlMeter';
import MidiIn from '../control/MidiIn';
import Oscilloscope from '../control/Oscilloscope';
import Speaker from '../output/Speaker';
import StickyNote from '../annotation/StickyNote';

type ModConstructor = new () => Mod;
type Category = 'oscillator' | 'effect' | 'filter' | 'control' | 'output' | 'misc';
Expand Down Expand Up @@ -53,7 +52,6 @@ const PROTOS: ProtoEntry[] = [
{ Ctor: Oscilloscope, label: 'scope', category: 'control' },
{ Ctor: Speaker, label: 'speaker', category: 'output' },
{ Ctor: MidiIn, label: 'midi', category: 'misc' },
{ Ctor: StickyNote, label: 'note', category: 'misc' },
];

const CATEGORY_ORDER: Category[] = ['oscillator', 'effect', 'filter', 'control', 'output', 'misc'];
Expand All @@ -67,7 +65,7 @@ const SCROLLBAR_W = 6;
/** Right margin for the scrollbar. */
const SCROLLBAR_MARGIN = 4;
/** Number of module columns visible in desktop library panel. */
const DESKTOP_COLS = 4;
const DESKTOP_COLS = 3;
/** Panel slide animation duration in ms. */
const PANEL_ANIMATION_MS = 220;

Expand Down Expand Up @@ -215,6 +213,7 @@ export default class Library {
}

this.panelGroup?.visible(true);

if (this.animationFrameId !== null) {
this.applyPanelTransform(this.animatedScreenX);
return;
Expand Down Expand Up @@ -304,6 +303,7 @@ export default class Library {
rack.stage.draggable(true);
rack.enableStageGestures();
});

// Background covers the full panel width.
this.panelBg = new Konva.Rect({
x: 0,
Expand Down Expand Up @@ -458,7 +458,8 @@ export default class Library {
layer.batchDraw();
});

// Block stage pan for any click anywhere inside the panel.
// Block stage pan for any click anywhere inside the panel (belt-and-suspenders
// alongside stage.draggable(false) set in open()).
this.panelGroup.on('mousedown touchstart', (e) => {
if (!this.isOpen) return;
e.cancelBubble = true;
Expand Down
Loading