From a7d392ea9cf519dc9516902762b197a51df6a5d9 Mon Sep 17 00:00:00 2001 From: Catherine Date: Sun, 7 Apr 2024 08:44:36 +0000 Subject: [PATCH] Fix waveform diagram default color scheme. --- README.md | 4 ++-- lib/api.js | 7 ++++--- pypi/.gitignore | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 2b4aa09..2780124 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,7 @@ This package embeds the [upstream WaveDrom library][upstream] bundled with the m * The `id` attribute of the root `` element is removed. * The stylesheets are altered to take into account dark color scheme preference via media queries. - * When rendering waveform diagrams, the `default` skin automatically switches between light and dark color scheme, and the `light` skin corresponds to the upstream `default` skin. + * By default, the diagrams automatically switch between light and dark color schemes based on the user preference. The light variant is the default upstream WaveDrom color scheme, and the dark variant is the same but with colors inverted. Unfortunately, it is not feasible to use media queries to switch between the default/light skin and the dark skin for waveform diagrams, and an inversion filter is used instead. * Several otherwise blocking bugs are worked around. [upstream]: https://npmjs.org/package/wavedrom @@ -63,4 +63,4 @@ Unlike most [YoWASP] packages, this package does not automatically track upstrea License ------- -This package is covered by the [MIT license](LICENSE.txt). \ No newline at end of file +This package is covered by the [MIT license](LICENSE.txt). diff --git a/lib/api.js b/lib/api.js index 58cf5a2..a6f86a0 100644 --- a/lib/api.js +++ b/lib/api.js @@ -22,9 +22,10 @@ const WaveSkin = { WaveSkin.default = JSON.parse(JSON.stringify(WaveSkin.light)); // `laneParamsFromSkin` uses hardcoded offsets into the skin to derive parameters, so the tag // structure of a skin must be preserved exactly, e.g. there can be exactly one