MCPcopy Index your code
hub / github.com/ampproject/amphtml / updatePaddingTop

Method updatePaddingTop

src/service/fixed-layer.js:272–278  ·  view source on GitHub ↗

* Updates the viewer's padding-top position and recalculates offsets of * all elements. The padding update can be transient, in which case the * UI itself is not updated leaving the blank space up top, which is invisible * due to scroll position. This mode saves significant resources. Howev

(paddingTop, opt_transient)

Source from the content-addressed store, hash-verified

270 * @param {boolean} opt_transient
271 */
272 updatePaddingTop(paddingTop, opt_transient) {
273 this.paddingTop_ = paddingTop;
274 if (!opt_transient) {
275 this.committedPaddingTop_ = paddingTop;
276 }
277 this.update();
278 }
279
280 /**
281 * Apply or reset transform style to fixed elements. The existing transition,

Callers 3

animateFixedElementsMethod · 0.95

Calls 1

updateMethod · 0.95

Tested by

no test coverage detected