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