Adjust plus button position and new node created. (#10124) (#10127)

This commit is contained in:
Adam Obuchowicz 2024-05-31 10:26:45 +02:00 committed by GitHub
parent 270f708e4f
commit 2ca2533a89
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 8 additions and 12 deletions

View File

@ -18,7 +18,7 @@ export async function goToGraph(page: Page, closeDocPanel: boolean = true) {
// Wait until nodes are loaded.
await expect(locate.graphNode(page)).toExist()
// Wait for position initialization
await expectNodePositionsInitialized(page, 64)
await expectNodePositionsInitialized(page, 72)
}
export async function expectNodePositionsInitialized(page: Page, yPos: number) {

View File

@ -109,7 +109,7 @@ test('Collapsing nodes', async ({ page }) => {
})
async function expectInsideMain(page: Page) {
await actions.expectNodePositionsInitialized(page, 64)
await actions.expectNodePositionsInitialized(page, 72)
await expect(locate.graphNode(page)).toHaveCount(MAIN_FILE_NODES)
await expect(locate.graphNodeByBinding(page, 'five')).toExist()
await expect(locate.graphNodeByBinding(page, 'ten')).toExist()
@ -124,14 +124,14 @@ async function expectInsideMain(page: Page) {
}
async function expectInsideFunc1(page: Page) {
await actions.expectNodePositionsInitialized(page, 192)
await actions.expectNodePositionsInitialized(page, 216)
await expect(locate.graphNode(page)).toHaveCount(3)
await expect(locate.graphNodeByBinding(page, 'f2')).toExist()
await expect(locate.graphNodeByBinding(page, 'result')).toExist()
}
async function expectInsideFunc2(page: Page) {
await actions.expectNodePositionsInitialized(page, 128)
await actions.expectNodePositionsInitialized(page, 144)
await expect(locate.graphNode(page)).toHaveCount(2)
await expect(locate.graphNodeByBinding(page, 'r')).toExist()
}

View File

@ -239,7 +239,7 @@ const showColorPicker = ref(false)
.below-slot5 {
position: absolute;
top: calc(var(--outer-diameter) - 24px);
top: calc(var(--outer-diameter) - 32px);
pointer-events: all;
}

View File

@ -19,6 +19,7 @@ function addNode() {
.SmallPlusButton {
width: var(--node-height);
height: var(--node-height);
margin: 0px;
backdrop-filter: var(--blur-app-bg);
background: var(--color-app-bg);

View File

@ -105,11 +105,6 @@ const contentStyle = computed(() => {
'--node-height': `${config.nodeSize.y}px`,
}"
>
<SmallPlusButton
v-if="config.isCircularMenuVisible"
class="below-viz"
@createNodes="config.createNodes(...$event)"
/>
<div
ref="contentNode"
class="content scrollable"

View File

@ -2,8 +2,8 @@
"node": {
"height": 32,
"corner_radius": 16,
"vertical_gap": 32,
"horizontal_gap": 32
"vertical_gap": 40,
"horizontal_gap": 40
},
"edge": {
"min_approach_height": 32,