diff --git a/View.cpp b/View.cpp index 76d3822..55d6f21 100644 --- a/View.cpp +++ b/View.cpp @@ -409,7 +409,7 @@ void LayerView::grab (glm::vec2 from, glm::vec2 to, Source *s, std::pairtranslation_ = start_translation + gl_Position_to - gl_Position_from; // diagonal movement only - sourceNode->translation_.x = CLAMP( sourceNode->translation_.x, -10.f, 0.f); + sourceNode->translation_.x = CLAMP( sourceNode->translation_.x, SCENE_DEPTH + 2.f, 0.f); sourceNode->translation_.y = sourceNode->translation_.x / aspect_ratio; // change depth diff --git a/defines.h b/defines.h index bafe1e2..b203b8e 100644 --- a/defines.h +++ b/defines.h @@ -23,7 +23,7 @@ #define EUCLIDEAN(P1, P2) sqrt((P1.x() - P2.x()) * (P1.x() - P2.x()) + (P1.y() - P2.y()) * (P1.y() - P2.y())) #define SCENE_UNIT 5.f -#define SCENE_DEPTH -10.f +#define SCENE_DEPTH -12.f #define CIRCLE_SQUARE_DIST(x,y) ( (x*x + y*y) / (SCENE_UNIT * SCENE_UNIT * SCENE_UNIT * SCENE_UNIT) ) #define IMGUI_TITLE_MAINWINDOW ICON_FA_CIRCLE_NOTCH " vimix"