Fixed broken post notes after fit mode changes

This commit is contained in:
rr- 2015-07-19 18:03:47 +02:00
parent 44ef66f65c
commit 8db72633f6

View file

@ -56,18 +56,16 @@ App.Presenters.PostContentPresenter = function(
function changeFitMode(mode) { function changeFitMode(mode) {
var $wrapper = $target.find('.object-wrapper'); var $wrapper = $target.find('.object-wrapper');
$wrapper.data('current-fit', mode); $wrapper.data('current-fit', mode);
fitters[$wrapper.data('current-fit')]($wrapper); fitters[$wrapper.data('current-fit')]($wrapper);
updatePostNotesSize();
} }
function cycleFitMode() { function cycleFitMode() {
var $wrapper = $target.find('.object-wrapper'); var $wrapper = $target.find('.object-wrapper');
var oldMode = getFitMode(); var oldMode = getFitMode();
var newMode = fitterNames[(fitterNames.indexOf(oldMode) + 1) % fitterNames.length]; var newMode = fitterNames[(fitterNames.indexOf(oldMode) + 1) % fitterNames.length];
$wrapper.data('current-fit', newMode); changeFitMode(newMode);
fitters[$wrapper.data('current-fit')]($wrapper);
updatePostNotesSize();
} }
function render() { function render() {