Closed aniude closed 11 months ago
Hi, Just trying to understand what the issue is that this is looking to fix, as it adds a lot of overhead to the one bit of the code where performance really matters.
this solution is just to fix if an element width or height is 0 px actually, it should not be calculated by lowestElement or taggedElement mode, although this element has large marginLeft or marginTop size.
for example, the page has a element marginTop is 1000px,but it's height is 0px, like the empty position, people can't see by eyes. it make confuses. the resize callback function will return the large length size and then the iframe also expand the large size.
So I think the more confortable way is ignore this element, or we can add the feature param as ignoreEmptyElement, I guess.
I’m sorry I think that is too much of an edge case and your change has too large of a perf impact for something most people don’t need.
I would recommend using taggedEllement
resize method in your usecase, or if you really want to do this you can use the API in the iFrame to add your own custom function.
hi @davidjbradshaw. please review this PR. the zero heigh/width should not be calculated.