Permalink
Browse files

fix: define calculateBBox method for smooth area shape for getBBox().

  • Loading branch information...
simaQ committed Aug 19, 2018
1 parent 20b18a9 commit ebf8539d73a62f4ed720a11feda50410a3d10ca1
Showing with 5 additions and 0 deletions.
  1. +5 −0 src/geom/shape/area.js
@@ -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) {
@@ -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 {

0 comments on commit ebf8539

Please sign in to comment.