Файл: templates/backend/default/assets/plugins/jquery-flot/jquery.flot.crosshair.min.js
Строк: 73
<?php
!function(e){function t(e){function t(){i.locked||-1!=i.x&&(i.x=-1,e.triggerRedrawOverlay())}function n(t){if(!i.locked){if(e.getSelection&&e.getSelection())return i.x=-1,void 0;var n=e.offset();i.x=Math.max(0,Math.min(t.pageX-n.left,e.width())),i.y=Math.max(0,Math.min(t.pageY-n.top,e.height())),e.triggerRedrawOverlay()}}var i={x:-1,y:-1,locked:!1};e.setCrosshair=function(t){if(t){var n=e.p2c(t);i.x=Math.max(0,Math.min(n.left,e.width())),i.y=Math.max(0,Math.min(n.top,e.height()))}else i.x=-1;e.triggerRedrawOverlay()},e.clearCrosshair=e.setCrosshair,e.lockCrosshair=function(t){t&&e.setCrosshair(t),i.locked=!0},e.unlockCrosshair=function(){i.locked=!1},e.hooks.bindEvents.push(function(e,i){e.getOptions().crosshair.mode&&(i.mouseout(t),i.mousemove(n))}),e.hooks.drawOverlay.push(function(e,t){var n=e.getOptions().crosshair;if(n.mode){var o=e.getPlotOffset();t.save(),t.translate(o.left,o.top),-1!=i.x&&(t.strokeStyle=n.color,t.lineWidth=n.lineWidth,t.lineJoin="round",t.beginPath(),-1!=n.mode.indexOf("x")&&(t.moveTo(i.x,0),t.lineTo(i.x,e.height())),-1!=n.mode.indexOf("y")&&(t.moveTo(0,i.y),t.lineTo(e.width(),i.y)),t.stroke()),t.restore()}}),e.hooks.shutdown.push(function(e,i){i.unbind("mouseout",t),i.unbind("mousemove",n)})}var n={crosshair:{mode:null,color:"rgba(170, 0, 0, 0.80)",lineWidth:1}};e.plot.plugins.push({init:t,options:n,name:"crosshair",version:"1.0"})}(jQuery);
?>