UNPKG

@nativescript-community/ui-pager

Version:

A NativeScript Pager / Carousel component that allows the user to swipe left and right through pages of data.

27 lines 851 B
var Scale = /** @class */ (function (_super) { __extends(Scale, _super); function Scale() { var _this = _super.call(this) || this; return global.__native(_this); } Scale.prototype.transformPage = function (view, position) { var MIN_SCALE = 0.85; if (position <= 1 || position >= -1) { var scale = Math.max(MIN_SCALE, 1 - Math.abs(position)); view.setScaleX(scale); view.setScaleY(scale); } else { view.setScaleX(1); view.setScaleY(1); } }; Scale = __decorate([ Interfaces([androidx.viewpager2.widget.ViewPager2.PageTransformer]), __metadata("design:paramtypes", []) ], Scale); return Scale; }(java.lang.Object)); export default Scale; export {}; //# sourceMappingURL=Scale.android.js.map