Skip to content

Commit

Permalink
Address code review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
etimberg committed Feb 2, 2019
1 parent 41b85bf commit 093d950
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions src/elements/element.rectangle.js
Expand Up @@ -206,15 +206,10 @@ module.exports = Element.extend({

getArea: function() {
var vm = this._view;
var area;

if (isVertical(this)) {
area = vm.width * Math.abs(vm.y - vm.base);
} else {
area = vm.height * Math.abs(vm.x - vm.base);
}

return area;
return isVertical(this)
? vm.width * Math.abs(vm.y - vm.base)
: vm.height * Math.abs(vm.x - vm.base);
},

tooltipPosition: function() {
Expand Down

0 comments on commit 093d950

Please sign in to comment.