Refactoring bounding box rendering method
This commit is contained in:
parent
5afb4fa717
commit
9609b1d5b7
@ -49,7 +49,7 @@
|
|||||||
fill: #f00;
|
fill: #f00;
|
||||||
}
|
}
|
||||||
|
|
||||||
rect.bounding-box {
|
path.bounding-box {
|
||||||
fill: transparent;
|
fill: transparent;
|
||||||
stroke: #000;
|
stroke: #000;
|
||||||
stroke-dasharray: 5,2;
|
stroke-dasharray: 5,2;
|
||||||
|
@ -30,14 +30,10 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
render_bbox(container, box) {
|
render_bbox(container, box) {
|
||||||
container.rect()
|
container.path(box.path)
|
||||||
.attr({
|
.attr({
|
||||||
'class': 'bounding-box',
|
'class': 'bounding-box'
|
||||||
width: box.width,
|
});
|
||||||
height: box.height
|
|
||||||
})
|
|
||||||
.transform(Snap.matrix()
|
|
||||||
.translate(box.x, box.y));
|
|
||||||
},
|
},
|
||||||
|
|
||||||
render(container) {
|
render(container) {
|
||||||
|
Loading…
Reference in New Issue
Block a user