Merge pull request #4302 from BrokenEagle/fix-nonembedded-note-resizing

Restrict note container resizing to embedded notes
This commit is contained in:
evazion
2020-02-23 01:01:44 -06:00
committed by GitHub

View File

@@ -174,9 +174,11 @@ let Note = {
if (was_visible) { if (was_visible) {
container.style.display = 'block'; container.style.display = 'block';
} }
const $image = $("#image"); if (Note.embed) {
const percentage = 100 * ($image.width() / parseFloat($image.data('large-width'))); const $image = $("#image");
$(container).css('font-size', percentage + '%'); const percentage = 100 * ($image.width() / parseFloat($image.data('large-width')));
$(container).css('font-size', percentage + '%');
}
}, },
toggle_all: function() { toggle_all: function() {