UNPKG

@progress/kendo-angular-common

Version:
21 lines (20 loc) 803 B
/**----------------------------------------------------------------------------------------- * Copyright © 2020 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the project root for more information *-------------------------------------------------------------------------------------------*/ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); /** * Normalizes a scroll position value in RTL mode. */ function rtlScrollPosition(position, element, initial) { var result = position; if (initial < 0) { result = -position; } else if (initial > 0) { result = element.scrollWidth - element.offsetWidth - position; } return result; } exports.rtlScrollPosition = rtlScrollPosition;