SourceTermAnalysisSystem_vue/node_modules/@antv/x6/lib/registry/grid/double-mesh.js
2026-05-15 10:22:44 +08:00

56 lines
1.7 KiB
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.doubleMesh = void 0;
const x6_common_1 = require("@antv/x6-common");
exports.doubleMesh = [
{
color: 'rgba(224,224,224,1)',
thickness: 1,
markup: 'path',
update(elem, options) {
let d;
const width = options.width;
const height = options.height;
const thickness = options.thickness;
if (width - thickness >= 0 && height - thickness >= 0) {
d = ['M', width, 0, 'H0 M0 0 V0', height].join(' ');
}
else {
d = 'M 0 0 0 0';
}
x6_common_1.Dom.attr(elem, {
d,
stroke: options.color,
'stroke-width': options.thickness,
});
},
},
{
color: 'rgba(224,224,224,0.2)',
thickness: 3,
factor: 4,
markup: 'path',
update(elem, options) {
let d;
const factor = options.factor || 1;
const width = options.width * factor;
const height = options.height * factor;
const thickness = options.thickness;
if (width - thickness >= 0 && height - thickness >= 0) {
d = ['M', width, 0, 'H0 M0 0 V0', height].join(' ');
}
else {
d = 'M 0 0 0 0';
}
// update wrapper size
options.width = width;
options.height = height;
x6_common_1.Dom.attr(elem, {
d,
stroke: options.color,
'stroke-width': options.thickness,
});
},
},
];
//# sourceMappingURL=double-mesh.js.map