MCPcopy
hub / github.com/ampproject/amphtml / getPositionStyle_

Method getPositionStyle_

third_party/subscriptions-project/swg.js:11328–11341  ·  view source on GitHub ↗

* Returns the styles required to postion the dialog. * @return {!Object } * @private

()

Source from the content-addressed store, hash-verified

11326 * @private
11327 */
11328 getPositionStyle_() {
11329 if (this.shouldPositionCenter_()) {
11330 return {
11331 'top': '50%',
11332 'bottom': 0,
11333 'transform': this.getDefaultTranslateY_(),
11334 };
11335 }
11336 return {
11337 'top': 'auto',
11338 'bottom': 0,
11339 'transform': this.getDefaultTranslateY_(),
11340 };
11341 }
11342
11343 /**
11344 * Returns default translateY style for the dialog.

Callers 1

setPosition_Method · 0.95

Calls 2

shouldPositionCenter_Method · 0.95
getDefaultTranslateY_Method · 0.95

Tested by

no test coverage detected