1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Merge pull request #3685 from node-red/quick-add-offset

Include scroll offset when positioning quick-add dialog
This commit is contained in:
Nick O'Leary 2022-06-16 23:31:38 +01:00 committed by GitHub
commit 9eaf5d82b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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')