Position.js 879 B

123456789101112131415161718192021222324252627282930313233343536
  1. /**
  2. * Copyright (c) Facebook, Inc. and its affiliates.
  3. *
  4. * This source code is licensed under the MIT license found in the
  5. * LICENSE file in the root directory of this source tree.
  6. *
  7. * @format
  8. */
  9. 'use strict';
  10. const PooledClass = require('./PooledClass');
  11. const twoArgumentPooler = PooledClass.twoArgumentPooler;
  12. /**
  13. * Position does not expose methods for construction via an `HTMLDOMElement`,
  14. * because it isn't meaningful to construct such a thing without first defining
  15. * a frame of reference.
  16. *
  17. * @param {number} windowStartKey Key that window starts at.
  18. * @param {number} windowEndKey Key that window ends at.
  19. */
  20. function Position(left, top) {
  21. this.left = left;
  22. this.top = top;
  23. }
  24. Position.prototype.destructor = function() {
  25. this.left = null;
  26. this.top = null;
  27. };
  28. PooledClass.addPoolingTo(Position, twoArgumentPooler);
  29. module.exports = Position;