mirror of
https://github.com/webstudio-is/webstudio.git
synced 2026-12-04 22:31:33 +09:00
fix: Instance outline is rendered above style panel (#4632)
## Description closes #4629 ## Steps for reproduction 1. click button 2. expect xyz ## Code Review - [ ] hi @kof, I need you to do - conceptual review (architecture, feature-correctness) - detailed review (read every line) - test it on preview ## Before requesting a review - [ ] made a self-review - [ ] added inline comments where things may be not obvious (the "why", not "what") ## Before merging - [ ] tested locally and on preview environment (preview dev login: 0000) - [ ] updated [test cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md) document - [ ] added tests - [ ] if any new env variables are added, added them to `.env` file
This commit is contained in:
1 parent
a27c8b9c9e
commit
7ec6c73325
1 file changed
+4
-2
@@ -111,6 +111,10 @@ export const Outline = ({
|
||||
Math.min(rect.left + rect.width, clampingRect.left + clampingRect.width) -
|
||||
Math.max(rect.left, clampingRect.left),
|
||||
};
|
||||
const dynamicStyle = useDynamicStyle(outlineRect);
|
||||
if (outlineRect.width <= 0 || outlineRect.height <= 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
const isLeftClamped = rect.left < outlineRect.left;
|
||||
const isTopClamped = rect.top < outlineRect.top;
|
||||
@@ -121,8 +125,6 @@ export const Outline = ({
|
||||
const isBottomClamped =
|
||||
Math.round(rect.top + rect.height) > Math.round(clampingRect.height);
|
||||
|
||||
const dynamicStyle = useDynamicStyle(outlineRect);
|
||||
|
||||
return (
|
||||
<>
|
||||
{propertyStyle}
|
||||
|
||||
Reference in new issue
Block a user