Include scroll offset when positioning quick-add dialog

Fixes #3684
This commit is contained in:
Nick O'Leary 2022-06-16 22:56:54 +01:00
parent 7d7682b34e
commit 1844633ff1
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9
1 changed files with 2 additions and 2 deletions

View File

@ -1071,8 +1071,8 @@ RED.view = (function() {
var oy = point[1];
const offset = $("#red-ui-workspace-chart").offset()
var clientX = ox + offset.left
var clientY = oy + offset.top
var clientX = ox + offset.left - $("#red-ui-workspace-chart").scrollLeft()
var clientY = oy + offset.top - $("#red-ui-workspace-chart").scrollTop()
if (RED.settings.get("editor").view['view-snap-grid']) {
// eventLayer.append("circle").attr("cx",point[0]).attr("cy",point[1]).attr("r","2").attr('fill','red')