From 76b34c62db64917a893ab5714bc222edc5dacdd6 Mon Sep 17 00:00:00 2001 From: Ewa Gasperowicz Date: Tue, 18 Sep 2018 07:26:51 +0200 Subject: [PATCH] Review code format fixes --- src/components/Output/custom-els/TwoUp/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/Output/custom-els/TwoUp/index.ts b/src/components/Output/custom-els/TwoUp/index.ts index 4d61d60e..0c76a5d2 100644 --- a/src/components/Output/custom-els/TwoUp/index.ts +++ b/src/components/Output/custom-els/TwoUp/index.ts @@ -89,8 +89,8 @@ export default class TwoUp extends HTMLElement { // Set the initial position of the handle. requestAnimationFrame(() => { const bounds = this.getBoundingClientRect(); - this._position = (this.orientation === 'vertical' ? - bounds.height : bounds.width) * this._relativePosition; + const dimensionAxis = this.orientation === 'vertical' ? 'height' : 'width'; + this._position = bounds[dimensionAxis] * this._relativePosition; this._setPosition(); }); }