doc section moved to node
This commit is contained in:
parent
7a4acb5bb6
commit
87174bfb83
6
index.js
6
index.js
@ -1,8 +1,8 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
MapBuilder: require('./svgmap/svg-map-builder'),
|
map_builder: require('./svgmap/svg-map-builder'),
|
||||||
|
style_adaptor: require('./svgmap/helpers/style-adaptor'),
|
||||||
|
svg_nodes: require('./svgmap/drawers/svg-nodes'),
|
||||||
MapSaver: require('./svgmap/svg-map-saver'),
|
MapSaver: require('./svgmap/svg-map-saver'),
|
||||||
BBox: require('./libs/bbox'),
|
BBox: require('./libs/bbox'),
|
||||||
StyleAdaptor: require('./svgmap/helpers/style-adaptor'),
|
|
||||||
SvgNode: require('./svgmap/svg-node'),
|
SvgNode: require('./svgmap/svg-node'),
|
||||||
SvgNodes: require('./svgmap/drawers/svg-nodes'),
|
|
||||||
}
|
}
|
||||||
@ -1,5 +1,5 @@
|
|||||||
class Transfrom {
|
class Transfrom {
|
||||||
static fromCoordSyses(cs1, cs2){
|
static fromCoordSystems(cs1, cs2){
|
||||||
let tr = new Transfrom()
|
let tr = new Transfrom()
|
||||||
|
|
||||||
tr.cs1 = cs1
|
tr.cs1 = cs1
|
||||||
|
|||||||
@ -1,9 +1,19 @@
|
|||||||
const SvgNode = require("./svg-node.js");
|
|
||||||
const SvgNodes = require("./drawers/svg-nodes.js");
|
|
||||||
const Defs = require('./helpers/style-defs')
|
|
||||||
const well_ring = require('./drawers/well-ring')
|
const well_ring = require('./drawers/well-ring')
|
||||||
const well_head = require('./drawers/well-head')
|
const well_head = require('./drawers/well-head')
|
||||||
const corel_layer = require('./drawers/corel-layer')
|
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 })));
|
||||||
|
|
||||||
|
if (bbox.w() == 0 || bbox.h() == 0) {
|
||||||
|
bbox.r += 1000;
|
||||||
|
bbox.b += 1000;
|
||||||
|
}
|
||||||
|
|
||||||
|
return bbox;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
function build_pt_layer(wells, settings, style) {
|
function build_pt_layer(wells, settings, style) {
|
||||||
function t2r(tons) {
|
function t2r(tons) {
|
||||||
@ -55,6 +65,7 @@ function build_it_layer(wells, settings, style) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
get_wells_bbox,
|
||||||
build_pt_layer,
|
build_pt_layer,
|
||||||
build_it_layer,
|
build_it_layer,
|
||||||
};
|
};
|
||||||
|
|||||||
@ -16,7 +16,7 @@ module.exports = class SvgSaver {
|
|||||||
const csh = Math.abs(cs_mm.y1 - cs_mm.y0);
|
const csh = Math.abs(cs_mm.y1 - cs_mm.y0);
|
||||||
const bbox_ppu = BBox.fromLTRB(cs_ppu.x0, cs_ppu.y0, cs_ppu.x1, cs_ppu.y1);
|
const bbox_ppu = BBox.fromLTRB(cs_ppu.x0, cs_ppu.y0, cs_ppu.x1, cs_ppu.y1);
|
||||||
|
|
||||||
this.tr = transfrom.fromCoordSyses(cs1, cs_ppu);
|
this.tr = transfrom.fromCoordSystems(cs1, cs_ppu);
|
||||||
|
|
||||||
this.settings = settings
|
this.settings = settings
|
||||||
this.style = adaptor.update_styles(style, settings.ppu);
|
this.style = adaptor.update_styles(style, settings.ppu);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user