UNPKG

ng-zorro-antd-yj

Version:

An enterprise-class UI components based on Ant Design and Angular

22 lines 1.73 kB
/** * @fileoverview added by tsickle * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ /** * @param {?} node * @return {?} */ export function scrollIntoView(node) { /** @type {?} */ var nodeAsAny = (/** @type {?} */ (node)); if (nodeAsAny.scrollIntoViewIfNeeded) { /* tslint:disable-next-line:no-string-literal */ nodeAsAny.scrollIntoViewIfNeeded(false); return; } if (node.scrollIntoView) { node.scrollIntoView(false); return; } } //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2Nyb2xsLWludG8tdmlldy1pZi1uZWVkZWQuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9uZy16b3Jyby1hbnRkLXlqLyIsInNvdXJjZXMiOlsiY29yZS91dGlsL3Njcm9sbC1pbnRvLXZpZXctaWYtbmVlZGVkLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7O0FBQUEsTUFBTSxVQUFVLGNBQWMsQ0FBQyxJQUFpQjs7UUFDeEMsU0FBUyxHQUFHLG1CQUFBLElBQUksRUFBTztJQUM3QixJQUFJLFNBQVMsQ0FBQyxzQkFBc0IsRUFBRTtRQUNwQyxnREFBZ0Q7UUFDaEQsU0FBUyxDQUFDLHNCQUFzQixDQUFDLEtBQUssQ0FBQyxDQUFDO1FBQ3hDLE9BQU87S0FDUjtJQUNELElBQUksSUFBSSxDQUFDLGNBQWMsRUFBRTtRQUN2QixJQUFJLENBQUMsY0FBYyxDQUFDLEtBQUssQ0FBQyxDQUFDO1FBQzNCLE9BQU87S0FDUjtBQUNILENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgZnVuY3Rpb24gc2Nyb2xsSW50b1ZpZXcobm9kZTogSFRNTEVsZW1lbnQpOiB2b2lkIHtcbiAgY29uc3Qgbm9kZUFzQW55ID0gbm9kZSBhcyBhbn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