Merge branch 'master' into dev

This commit is contained in:
Nick O'Leary
2025-04-14 11:04:06 +01:00
8 changed files with 51 additions and 10 deletions

View File

@@ -27,7 +27,6 @@ RED.i18n = (function() {
apiRootUrl = options.apiRootUrl||"";
var preferredLanguage = localStorage.getItem("editor-language") || detectLanguage();
var opts = {
compatibilityJSON: 'v3',
backend: {
loadPath: apiRootUrl+'locales/__ns__?lng=__lng__',
},

View File

@@ -401,7 +401,7 @@ RED.palette = (function() {
} else {
// Firefox doesn't do getIntersectionList and that
// makes us sad
nodes = RED.view.getLinksAtPoint(mouseX,mouseY);
nodes = RED.view.getLinksAtPoint(mouseX / RED.view.scale(), mouseY / RED.view.scale());
}
var mx = mouseX / RED.view.scale();
var my = mouseY / RED.view.scale();

View File

@@ -1908,7 +1908,7 @@ RED.view = (function() {
} else {
// Firefox doesn"t do getIntersectionList and that
// makes us sad
nodes = RED.view.getLinksAtPoint(mouseX*scaleFactor,mouseY*scaleFactor);
nodes = RED.view.getLinksAtPoint(mouseX, mouseY);
}
for (var i=0;i<nodes.length;i++) {
if (d3.select(nodes[i]).classed("red-ui-flow-link-background")) {
@@ -6333,6 +6333,12 @@ RED.view = (function() {
var links = outer.selectAll(".red-ui-flow-link-background")[0];
for (var i=0;i<links.length;i++) {
var bb = links[i].getBBox();
if (bb.height === 0) {
// For horizontal links, add some real height to make them easier
// to hit.
bb.y -= Math.max(5, 5 / scaleFactor);
bb.height = Math.max(10, 10 / scaleFactor);
}
if (x >= bb.x && y >= bb.y && x <= bb.x+bb.width && y <= bb.y+bb.height) {
result.push(links[i])
}