MCPcopy Index your code
hub / github.com/SuperMap/iClient-JavaScript / containsBounds

Method containsBounds

src/common/commontypes/Bounds.js:543–557  ·  view source on GitHub ↗

* @function Bounds.prototype.containsBounds * @description 判断目标边界是否被当前边界包含在内。 * @example * var bounds = new Bounds(-180,-90,100,80); * var isContains = bounds.containsBounds( * new Bounds(-170,-90,100,80),true,true * ); * @param {Bounds} bounds - 目标边界。 *

(bounds, partial, inclusive)

Source from the content-addressed store, hash-verified

541 * @returns {boolean} 传入的边界是否被当前边界包含。
542 */
543 containsBounds(bounds, partial, inclusive) {
544 if (partial == null) {
545 partial = false;
546 }
547 if (inclusive == null) {
548 inclusive = true;
549 }
550 var bottomLeft = this.contains(bounds.left, bounds.bottom, inclusive);
551 var bottomRight = this.contains(bounds.right, bounds.bottom, inclusive);
552 var topLeft = this.contains(bounds.left, bounds.top, inclusive);
553 var topRight = this.contains(bounds.right, bounds.top, inclusive);
554
555 return (partial) ? (bottomLeft || bottomRight || topLeft || topRight)
556 : (bottomLeft && bottomRight && topLeft && topRight);
557 }
558
559 /**
560 * @function Bounds.prototype.determineQuadrant

Callers 3

intersectsBoundsMethod · 0.80
toGeoRegionMethod · 0.80
toGeoRegionEPSMethod · 0.80

Calls 1

containsMethod · 0.95

Tested by

no test coverage detected