Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
SeleniumHQ
GitHub Repository: SeleniumHQ/Selenium
Path: blob/trunk/third_party/closure/goog/positioning/abstractposition.js
4084 views
1
/**
2
* @license
3
* Copyright The Closure Library Authors.
4
* SPDX-License-Identifier: Apache-2.0
5
*/
6
7
/**
8
* @fileoverview Abstract base class for positioning implementations.
9
*/
10
11
goog.provide('goog.positioning.AbstractPosition');
12
13
goog.requireType('goog.math.Box');
14
goog.requireType('goog.math.Size');
15
goog.requireType('goog.positioning.Corner');
16
17
18
19
/**
20
* Abstract position object. Encapsulates position and overflow handling.
21
*
22
* @constructor
23
*/
24
goog.positioning.AbstractPosition = function() {};
25
26
27
/**
28
* Repositions the element. Abstract method, should be overloaded.
29
*
30
* @param {Element} movableElement Element to position.
31
* @param {goog.positioning.Corner} corner Corner of the movable element that
32
* should be positioned adjacent to the anchored element.
33
* @param {goog.math.Box=} opt_margin A margin specified in pixels.
34
* @param {goog.math.Size=} opt_preferredSize PreferredSize of the
35
* movableElement.
36
*/
37
goog.positioning.AbstractPosition.prototype.reposition = function(
38
movableElement, corner, opt_margin, opt_preferredSize) {};
39
40