Skip to content

Commit

Permalink
fix(TEMP): remove resize observer
Browse files Browse the repository at this point in the history
  • Loading branch information
silvester-pari committed Sep 19, 2023
1 parent b7c8c6a commit f169082
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 33 deletions.
6 changes: 0 additions & 6 deletions cypress/support/component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,3 @@ import { mount } from "cypress-lit";
type mount = typeof mount;

Cypress.Commands.add("mount", mount);

Cypress.on('uncaught:exception', (err, runnable) => {
// returning false here prevents Cypress from
// failing the test
return false
})
26 changes: 0 additions & 26 deletions elements/layercontrol/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,32 +164,6 @@ export class EOxLayerControl extends LitElement {
}
}

// Set up Resize Observer
firstUpdated() {
this.resizeObserver = new ResizeObserver((entries) => {
for (let entry of entries) {
// Ensure we're observing the correct element
if (entry.target === this) {
this.style.setProperty(
"--container-height",
`${entry.contentRect.height}px`
);
this.requestUpdate();
}
}
});
this.resizeObserver.observe(this);
}

// Deinitialize Resize Observer
disconnectedCallback() {
if (this.resizeObserver) {
this.resizeObserver.disconnect();
this.resizeObserver = null;
}
super.disconnectedCallback();
}

render() {
const mapQuery = document.querySelector(this.for as string);
if (mapQuery) {
Expand Down
1 change: 0 additions & 1 deletion elements/layercontrol/src/style.eox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ summary > .layer {
ul[data-group] {
overflow-y: auto;
max-height: calc(var(--container-height) * 0.3);
}
[data-type=group] .title {
Expand Down

0 comments on commit f169082

Please sign in to comment.