{"version":3,"sources":["public/src/modules/scrollStop.js"],"names":["define","Module","apply","element","$","on","e","scrollTop","this","scrollHeight","elementHeight","Math","round","getBoundingClientRect","height","originalEvent","deltaY"],"mappings":"AAAA,aAWAA,OAAO,aAAc,WACpB,IAAIC,KAEJA,EAAOC,MAAQ,SAAUC,GACxBC,EAAED,GAASE,GAAG,aAAc,SAAUC,GACrC,IAAIC,EAAYC,KAAKD,UACrB,IAAIE,EAAeD,KAAKC,aACxB,IAAIC,EAAgBC,KAAKC,MAAMJ,KAAKK,wBAAwBC,QAE5D,GACER,EAAES,cAAcC,OAAS,GAAKT,IAAc,GAC5CD,EAAES,cAAcC,OAAS,GAAMN,EAAgBH,GAAcE,EAC7D,CACD,OAAO,UAKV,OAAOR","file":"public/src/modules/scrollStop.js","sourcesContent":["'use strict';\n\n\n/*\n\tThe point of this library is to enhance(tm) a textarea so that if scrolled,\n\tyou can only scroll to the top of it and the event doesn't bubble up to\n\tthe document... because it does... and it's annoying at times.\n\n\tWhile I'm here, might I say this is a solved issue on Linux?\n*/\n\ndefine('scrollStop', function () {\n\tvar Module = {};\n\n\tModule.apply = function (element) {\n\t\t$(element).on('mousewheel', function (e) {\n\t\t\tvar scrollTop = this.scrollTop;\n\t\t\tvar scrollHeight = this.scrollHeight;\n\t\t\tvar elementHeight = Math.round(this.getBoundingClientRect().height);\n\n\t\t\tif (\n\t\t\t\t(e.originalEvent.deltaY < 0 && scrollTop === 0) || // scroll up\n\t\t\t\t(e.originalEvent.deltaY > 0 && (elementHeight + scrollTop) >= scrollHeight)\t// scroll down\n\t\t\t) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t});\n\t};\n\n\treturn Module;\n});\n"]}