diff --git a/packages/editor-ui/src/constants.ts b/packages/editor-ui/src/constants.ts index 5ec4996ddf..a6d81a7ba0 100644 --- a/packages/editor-ui/src/constants.ts +++ b/packages/editor-ui/src/constants.ts @@ -289,3 +289,6 @@ export const TEST_PIN_DATA = [ }, ]; export const MAPPING_PARAMS = [`$evaluateExpression`, `$item`, `$jmespath`, `$node`, `$binary`, `$data`, `$env`, `$json`, `$now`, `$parameters`, `$position`, `$resumeWebhookUrl`, `$runIndex`, `$today`, `$workflow`, '$parameter']; + +export const DEFAULT_STICKY_HEIGHT = 160; +export const DEFAULT_STICKY_WIDTH = 240; diff --git a/packages/editor-ui/src/views/NodeView.vue b/packages/editor-ui/src/views/NodeView.vue index 353fc87f9a..f44c59d4f1 100644 --- a/packages/editor-ui/src/views/NodeView.vue +++ b/packages/editor-ui/src/views/NodeView.vue @@ -72,7 +72,7 @@ />
{ + return getRelativePosition((window.innerWidth - SIDEBAR_WIDTH) / 2, (window.innerHeight - HEADER_HEIGHT) / 2, scale, offset); +}; + export const getBackgroundStyles = (scale: number, offsetPosition: XYPosition) => { const squareSize = GRID_SIZE * scale; const dotSize = 1 * scale;