Liferay.Loader.define("liferay!object-js-components-web$codemirror@5.65.12/addon/display/rulers",["module","exports","require","../../lib/codemirror"],(function(e,r,t){var l,o=void 0;window;l=function(e){"use strict";function drawRulers(r){r.state.rulerDiv.textContent="";var t=r.getOption("rulers"),l=r.defaultCharWidth(),o=r.charCoords(e.Pos(r.firstLine(),0),"div").left;r.state.rulerDiv.style.minHeight=r.display.scroller.offsetHeight+30+"px";for(var i=0;i<t.length;i++){var s=document.createElement("div");s.className="CodeMirror-ruler";var a,n=t[i];"number"==typeof n?a=n:(a=n.column,n.className&&(s.className+=" "+n.className),n.color&&(s.style.borderColor=n.color),n.lineStyle&&(s.style.borderLeftStyle=n.lineStyle),n.width&&(s.style.borderLeftWidth=n.width)),s.style.left=o+a*l+"px",r.state.rulerDiv.appendChild(s)}}e.defineOption("rulers",!1,(function(e,r){e.state.rulerDiv&&(e.state.rulerDiv.parentElement.removeChild(e.state.rulerDiv),e.state.rulerDiv=null,e.off("refresh",drawRulers)),r&&r.length&&(e.state.rulerDiv=e.display.lineSpace.parentElement.insertBefore(document.createElement("div"),e.display.lineSpace),e.state.rulerDiv.className="CodeMirror-rulers",drawRulers(e),e.on("refresh",drawRulers))}))},"object"==typeof r&&"object"==typeof e?l(t("../../lib/codemirror")):"function"==typeof o&&o.amd?o(["../../lib/codemirror"],l):l(CodeMirror)}));
//# sourceMappingURL=rulers.js.map