Merge pull request #2875 from bromagosa/blocksZoom-param

added blocksZoom URL param to set blocks scale for the current session
snap7
Jens Mönig 2021-08-06 10:07:35 +02:00 zatwierdzone przez GitHub
commit 4ce0c9d204
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 5 dodań i 0 usunięć

Wyświetl plik

@ -381,6 +381,11 @@ IDE_Morph.prototype.openIn = function (world) {
if (dict.noExitWarning) {
window.onbeforeunload = nop;
}
if (dict.blocksZoom) {
myself.savingPreferences = false;
myself.setBlocksScale(Math.max(1,Math.min(dict.blocksZoom, 12)));
myself.savingPreferences = true;
}
// only force my world to get focus if I'm not in embed mode
// to prevent the iFrame from involuntarily scrolling into view