Skip to content

Commit

Permalink
fix: define calculateBBox method for smooth area shape for getBBox().
Browse files Browse the repository at this point in the history
  • Loading branch information
simaQ committed Aug 19, 2018
1 parent 20b18a9 commit ebf8539
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/geom/shape/area.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const Util = require('../../util/common');
const Shape = require('./shape');
const Smooth = require('../../graphic/util/smooth');
const bbox = require('../../graphic/util/bbox');
const Global = require('../../global');

function equals(v1, v2) {
Expand Down Expand Up @@ -53,6 +54,10 @@ function drawRectShape(topPoints, bottomPoints, container, style, isSmooth) {
}
}
context.closePath();
},
calculateBox() {
const points = this._attrs.attrs.points;
return bbox.getBBoxFromPoints(points);
}
});
} else {
Expand Down

0 comments on commit ebf8539

Please sign in to comment.