PreparedPoint.js 453 B

123456789101112131415
  1. import BasicPreparedGeometry from './BasicPreparedGeometry'
  2. export default class PreparedPoint extends BasicPreparedGeometry {
  3. constructor() {
  4. super()
  5. PreparedPoint.constructor_.apply(this, arguments)
  6. }
  7. static constructor_() {
  8. const point = arguments[0]
  9. BasicPreparedGeometry.constructor_.call(this, point)
  10. }
  11. intersects(g) {
  12. if (!this.envelopesIntersect(g)) return false
  13. return this.isAnyTargetComponentInTest(g)
  14. }
  15. }