unified palette: don't animate scrolling if delta is zero

snap7
jmoenig 2021-07-05 16:54:47 +02:00
rodzic 601b04a72e
commit e934f14745
2 zmienionych plików z 3 dodań i 0 usunięć

Wyświetl plik

@ -22,6 +22,8 @@
* gui: unified palette: indicate "selected" category in selector buttons
* extensions: web-serial extension primitives, pioneered by Dariusz Dorożalski
* added new "serial ports" library
* added jshint esversion tags
* gui: unified palette: don't animate scrolling if delta is zero
### 2021-07-04
* fixed audio_comp library "plot sound" block to work with translations, thanks, Hans, for the report!

Wyświetl plik

@ -2569,6 +2569,7 @@ IDE_Morph.prototype.scrollPaletteToCategory = function (category) {
);
if (firstInCategory === undefined) {return; }
delta = palette.top() - firstInCategory.top() + palette.padding;
if (delta === 0) {return; }
this.world().animations.push(new Animation(
y => { // setter
palette.contents.setTop(y);