Skip to content

Commit 093d950

Browse files
committed
Address code review feedback
1 parent 41b85bf commit 093d950

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

src/elements/element.rectangle.js

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -206,15 +206,10 @@ module.exports = Element.extend({
206206

207207
getArea: function() {
208208
var vm = this._view;
209-
var area;
210209

211-
if (isVertical(this)) {
212-
area = vm.width * Math.abs(vm.y - vm.base);
213-
} else {
214-
area = vm.height * Math.abs(vm.x - vm.base);
215-
}
216-
217-
return area;
210+
return isVertical(this)
211+
? vm.width * Math.abs(vm.y - vm.base)
212+
: vm.height * Math.abs(vm.x - vm.base);
218213
},
219214

220215
tooltipPosition: function() {

0 commit comments

Comments
 (0)