Skip to content

Commit

Permalink
fix(edgeless): note toolbar position (toeverything#3241)
Browse files Browse the repository at this point in the history
  • Loading branch information
Flrande committed Jun 29, 2023
1 parent f3ccacb commit 187b91a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -256,14 +256,12 @@ export class EdgelessSelectedRect extends WithDisposable(LitElement) {
if (!componentToolbar) return;

computePosition(this._selectedRect, componentToolbar, {
placement: 'top',
placement: 'top-start',
middleware: [
offset({
mainAxis: 12,
}),
flip({
fallbackPlacements: ['bottom'],
mainAxis: 8,
}),
flip(),
],
}).then(({ x, y }) => {
Object.assign(componentToolbar.style, {
Expand Down
2 changes: 1 addition & 1 deletion tests/utils/actions/edgeless.ts
Original file line number Diff line number Diff line change
Expand Up @@ -698,7 +698,7 @@ export async function initThreeOverlapFilledShapes(page: Page) {
end: { x: 260, y: 260 },
};
await addBasicRectShapeElement(page, rect2.start, rect2.end);
await page.mouse.click(rect1.start.x + 5, rect1.start.y + 5);
await page.mouse.click(rect2.start.x + 5, rect2.start.y + 5);
await triggerComponentToolbarAction(page, 'changeShapeFillColor');
await changeShapeFillColor(page, '--affine-palette-shape-white');
}
Expand Down

0 comments on commit 187b91a

Please sign in to comment.