-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Adding margin support to attemptChangeSize #6626
Copy link
Copy link
Closed
Description
Unless there are any objections, I'd like to add the ability to specify new margin sizes to the attemptChangeSize function in resources-impl.js.
This would change it to something like:
/**
- @param {!Element} element
- @param {number|undefined} newHeight
- @param {number|undefined} newWidth
- @param {number|undefined} newMarginTop
- @param {number|undefined} newMarginBottom
- @return {!Promise}
- @Protected
*/
attemptChangeSize(element, newHeight, newWidth, newMarginTop, newMarginBottom) {
...
}
The mutateWork_() function would then include any margin changes in its calculation of the height increase and allow/disallow the size change and adjust any scrolling accordingly. This will probably require adding knowledge of margins to resource.js. They can be determined using window.getComputedStyle().
This will be useful for the feature: #6196
Reactions are currently unavailable