get_bbox unlinked from base
This commit is contained in:
@@ -3,12 +3,12 @@ const well_head = require('./drawers/well-head')
|
||||
const corel_layer = require('./drawers/corel-layer')
|
||||
const BBox = require('../libs/bbox')
|
||||
|
||||
function get_wells_bbox(data) {
|
||||
let bbox = BBox.from_array(data.map((w) => ({ x: w.whx, y: w.why })));
|
||||
function get_bbox(data, min_size = 1000) {
|
||||
let bbox = BBox.from_array(data)
|
||||
|
||||
if (bbox.w() == 0 || bbox.h() == 0) {
|
||||
bbox.r += 1000;
|
||||
bbox.b += 1000;
|
||||
bbox.r += min_size;
|
||||
bbox.b += min_size;
|
||||
}
|
||||
|
||||
return bbox;
|
||||
@@ -65,7 +65,7 @@ function build_it_layer(wells, settings, style) {
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
get_wells_bbox,
|
||||
get_bbox,
|
||||
build_pt_layer,
|
||||
build_it_layer,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user