Liferay.Loader.define("liferay!template-web$codemirror@5.65.2/addon/display/rulers",["module","exports","require","../../lib/codemirror"],(function(e,r,t){var l,i=void 0;window;l=function(e){"use strict";function drawRulers(r){r.state.rulerDiv.textContent="";var t=r.getOption("rulers"),l=r.defaultCharWidth(),i=r.charCoords(e.Pos(r.firstLine(),0),"div").left;r.state.rulerDiv.style.minHeight=r.display.scroller.offsetHeight+30+"px";for(var o=0;o<t.length;o++){var a=document.createElement("div");a.className="CodeMirror-ruler";var s,d=t[o];"number"==typeof d?s=d:(s=d.column,d.className&&(a.className+=" "+d.className),d.color&&(a.style.borderColor=d.color),d.lineStyle&&(a.style.borderLeftStyle=d.lineStyle),d.width&&(a.style.borderLeftWidth=d.width)),a.style.left=i+s*l+"px",r.state.rulerDiv.appendChild(a)}}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 i&&i.amd?i(["../../lib/codemirror"],l):l(CodeMirror)}));
//# sourceMappingURL=rulers.js.map