fix: remove scene hack from export.ts & remove pass elementsMap to getContainingFrame (#7713)

* fix: remove scene hack from export.ts as its not needed anymore

* remove

* pass elementsMap to getContainingFrame

* remove unused `mapElementIds` param

---------

Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
This commit is contained in:
Aakansha Doshi 2024-02-21 16:34:20 +05:30 committed by GitHub
parent 2e719ff671
commit 361a9449bb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 38 additions and 92 deletions

View file

@ -1131,7 +1131,7 @@ class App extends React.Component<AppProps, AppState> {
display: isVisible ? "block" : "none",
opacity: getRenderOpacity(
el,
getContainingFrame(el),
getContainingFrame(el, this.scene.getNonDeletedElementsMap()),
this.elementsPendingErasure,
),
["--embeddable-radius" as string]: `${getCornerRadius(
@ -4399,7 +4399,7 @@ class App extends React.Component<AppProps, AppState> {
),
).filter((element) => {
// hitting a frame's element from outside the frame is not considered a hit
const containingFrame = getContainingFrame(element);
const containingFrame = getContainingFrame(element, elementsMap);
return containingFrame &&
this.state.frameRendering.enabled &&
this.state.frameRendering.clip
@ -7789,7 +7789,7 @@ class App extends React.Component<AppProps, AppState> {
);
if (linearElement?.frameId) {
const frame = getContainingFrame(linearElement);
const frame = getContainingFrame(linearElement, elementsMap);
if (frame && linearElement) {
if (