From a8f6076b730fc3175fad20893789314fe69097af Mon Sep 17 00:00:00 2001 From: Anton Date: Fri, 6 Jan 2023 11:02:56 +0100 Subject: [PATCH] Fix new task canvas position [SCI-7694] --- app/controllers/my_modules_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/my_modules_controller.rb b/app/controllers/my_modules_controller.rb index ae9947fc2..54f2ae9d4 100644 --- a/app/controllers/my_modules_controller.rb +++ b/app/controllers/my_modules_controller.rb @@ -36,8 +36,8 @@ class MyModulesController < ApplicationController def create max_xy = @experiment.my_modules.select('MAX("my_modules"."x") AS x, MAX("my_modules"."y") AS y').take - x = max_xy.x ? (max_xy.x + 10) : 1 - y = max_xy.y ? (max_xy.y + 10) : 1 + x = max_xy.x ? (max_xy.x + 14) : 1 + y = max_xy.y ? (max_xy.y + 14) : 1 @my_module = @experiment.my_modules.new(my_module_params) @my_module.assign_attributes(created_by: current_user, last_modified_by: current_user, x: x, y: y) @my_module.transaction do