mirror of
https://github.com/rr-/szurubooru.git
synced 2025-07-17 08:26:24 +00:00
Improved post sizing, added [F]ullscreen hotkey
This commit is contained in:
@ -45,8 +45,8 @@ App.Presenters.PostContentPresenter = function(
|
||||
}
|
||||
|
||||
function updatePostNotesSize() {
|
||||
$target.find('.post-notes-target').width($target.find('.image-wrapper').outerWidth());
|
||||
$target.find('.post-notes-target').height($target.find('.image-wrapper').outerHeight());
|
||||
$target.find('.post-notes-target').width($target.find('.object-wrapper').outerWidth());
|
||||
$target.find('.post-notes-target').height($target.find('.object-wrapper').outerHeight());
|
||||
}
|
||||
|
||||
function addNewPostNote() {
|
||||
@ -57,6 +57,7 @@ App.Presenters.PostContentPresenter = function(
|
||||
init: init,
|
||||
render: render,
|
||||
addNewPostNote: addNewPostNote,
|
||||
updatePostNotesSize: updatePostNotesSize,
|
||||
};
|
||||
|
||||
};
|
||||
|
@ -134,6 +134,18 @@ App.Presenters.PostPresenter = function(
|
||||
editButtonClicked(null);
|
||||
});
|
||||
|
||||
keyboard.keyup('f', function() {
|
||||
var $wrapper = $el.find('.object-wrapper');
|
||||
if ($wrapper.data('full')) {
|
||||
$wrapper.css({maxWidth: $wrapper.attr('data-width') + 'px', width: 'auto'});
|
||||
$wrapper.data('full', false);
|
||||
} else {
|
||||
$wrapper.css({maxWidth: null, width: $wrapper.attr('data-width')});
|
||||
$wrapper.data('full', true);
|
||||
}
|
||||
postContentPresenter.updatePostNotesSize();
|
||||
});
|
||||
|
||||
attachSidebarEvents();
|
||||
|
||||
attachLinksToPostsAround();
|
||||
|
Reference in New Issue
Block a user