Skip to content

Commit

Permalink
Disable smooth sliding in line note styles.
Browse files Browse the repository at this point in the history
  • Loading branch information
PoneyClairDeLune committed Oct 21, 2023
1 parent 1cd1704 commit 4950966
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/cambiare/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,8 @@ let Cambiare = class extends RootDisplay {
let upThis = this;
upThis.#style = value;
upThis.#redrawNotesInternal(upThis.render(upThis.#clockSource?.currentTime || 0));
classOff(upThis.#canvas, [`cambiare-style-block`, `cambiare-style-comb`, `cambiare-style-piano`, `cambiare-style-line`]);
classOn(upThis.#canvas, [`cambiare-style-${value}`]);
};
setClockSource(clockSource) {
this.#clockSource = clockSource;
Expand Down Expand Up @@ -605,7 +607,7 @@ let Cambiare = class extends RootDisplay {
attachElement.appendChild(containerElement);
upThis.#container = containerElement;
// Insert the canvas
let canvasElement = createElement("div", ["cambiare-canvas", "cambiare-port1", "cambiare-start0"]);
let canvasElement = createElement("div", ["cambiare-canvas", "cambiare-port1", "cambiare-start0", "cambiare-style-block"]);
containerElement.appendChild(canvasElement);
upThis.#canvas = canvasElement;
// Start the resizer
Expand Down
2 changes: 2 additions & 0 deletions test/css/cambiare.css
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,8 @@ div.cambiare-canvas > div.sect-part div.part-keyboard {
height: 100%;
width: calc(100% * 128 / 176);
margin: 0 calc(100% * 24 / 176);
}
div.cambiare-canvas:not(div.cambiare-style-line) > div.sect-part div.part-keyboard {
transition: 0.05s transform;
}
div.cambiare-canvas.cambiare-port4 > div.sect-part div.part-info-minor {
Expand Down

0 comments on commit 4950966

Please sign in to comment.