abstractposition.js 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. // Copyright 2006 The Closure Library Authors. All Rights Reserved.
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS-IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. /**
  15. * @fileoverview Abstract base class for positioning implementations.
  16. *
  17. * @author eae@google.com (Emil A Eklund)
  18. */
  19. goog.provide('goog.positioning.AbstractPosition');
  20. /**
  21. * Abstract position object. Encapsulates position and overflow handling.
  22. *
  23. * @constructor
  24. */
  25. goog.positioning.AbstractPosition = function() {};
  26. /**
  27. * Repositions the element. Abstract method, should be overloaded.
  28. *
  29. * @param {Element} movableElement Element to position.
  30. * @param {goog.positioning.Corner} corner Corner of the movable element that
  31. * should be positioned adjacent to the anchored element.
  32. * @param {goog.math.Box=} opt_margin A margin specified in pixels.
  33. * @param {goog.math.Size=} opt_preferredSize PreferredSize of the
  34. * movableElement.
  35. */
  36. goog.positioning.AbstractPosition.prototype.reposition = function(
  37. movableElement, corner, opt_margin, opt_preferredSize) {};