More freedom of grab translation for all views

This commit is contained in:
Bruno Herbelin
2021-11-17 23:09:49 +01:00
parent fc4e3dc362
commit 6a3ff2f235
7 changed files with 16 additions and 7 deletions

View File

@@ -252,7 +252,7 @@ void TextureView::resize ( int scale )
scene.root()->scale_.y = z;
// Clamp translation to acceptable area
glm::vec3 border(scene.root()->scale_.x * 1.5, scene.root()->scale_.y * 1.5, 0.f);
glm::vec3 border(2.f * Mixer::manager().session()->frame()->aspectRatio(), 2.f, 0.f);
scene.root()->translation_ = glm::clamp(scene.root()->translation_, -border, border);
}