Minor fixes

This commit is contained in:
Frikky
2026-02-11 11:41:13 +01:00
parent 3671c63d52
commit a889bec917
4 changed files with 37 additions and 7 deletions
+28 -1
View File
@@ -25249,7 +25249,7 @@ const AngularWorkflow = (defaultprops) => {
elements={elements}
minZoom={0.35}
maxZoom={2.0}
wheelSensitivity={0.25}
userZoomingEnabled={false}
style={{
width: workflow?.public && !isLoggedIn ? cytoscapeWidth + 50 : cytoscapeWidth,
height: workflow?.public && !isLoggedIn ? (bodyHeight - 50) : bodyHeight - 2,
@@ -25264,6 +25264,33 @@ const AngularWorkflow = (defaultprops) => {
// FIXME: There's something specific loading when
// you do the first hover of a node. Why is this different?
// Custom wheel handler for sensitivity for same zoom in and zoom out effect with mouse and touch pad
const container = incy.container();
if (container && !container._customWheelHandler) {
container._customWheelHandler = true;
container.addEventListener('wheel', (e) => {
e.preventDefault();
const sensitivity = 0.25;
const zoomFactor = Math.pow(10, -e.deltaY * sensitivity / 500);
const currentZoom = incy.zoom();
let newZoom = currentZoom * zoomFactor;
newZoom = Math.max(0.35, Math.min(2.0, newZoom));
// Zoom towards cursor position
const rect = container.getBoundingClientRect();
const position = {
x: e.clientX - rect.left,
y: e.clientY - rect.top
};
incy.zoom({
level: newZoom,
renderedPosition: position
});
}, { passive: false });
}
setCy(incy);
}}
+4 -2
View File
@@ -65,6 +65,7 @@ import { Context } from "../context/ContextApi.jsx";
import {
SearchBox,
StaticRefinementList,
RefinementList,
InstantSearch,
connectSearchBox,
@@ -1452,11 +1453,12 @@ const buttonBackground = "linear-gradient(to right, #f86a3e, #f34079)";
const index = searchClient.initIndex("appsearch");
console.log("Running appsearch for: ", appname);
if (appname === "integration") {
if (appname === "integration" || appname == "singul") {
// Redirect to https://singul.io
window.location.href = "https://singul.io"
} else if (appname === "shuffle_agent") {
} else if (appname === "shuffle_agent" || appname === "agent" || appname === "agents" || appname == "shuffle-agent") {
navigate("/agents")
return
}
index
+1 -1
View File
@@ -107,7 +107,7 @@ const SetAuthentication = (props) => {
// Set the orgsession to be a cookie for __session cookie
setTimeout(() => {
document.cookie = "__session=" + orgsession + "; path=/; max-age=1800"; // Cookie expires in 30 min
document.cookie = "__session=" + orgsession + "; path=/; max-age=1800; SameSite=Lax"; // Cookie expires in 30 min
}, 1000)
}