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:
commit
9eaf5d82b6
@ -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')
|
||||
|
Loading…
Reference in New Issue
Block a user