<commit_before>/*************
 * Marker Creation Interface code
 */
function setupMarkerCreation(markupBuilder) {
   var enabled = false,
       dragging = false,
       canvas = markupBuilder.fabricCanvas,
       mouseDownEvent,
       color,
       currentShape,
       shapeMode = Enum(['select', 'circle', 'rectangle']);

   canvas.on({
   'mouse:down': function(event) {
      if (!enabled) return;
      mouseDownEvent = event.e;
   },'mouse:move': function(event) {
      if (!enabled) return;
      if (!dragging) {
         if (mouseDownEvent) {
            var dragDist = distance(mouseDownEvent, event.e);
            if (dragDist > 10) {
               startDragging(mouseDownEvent, event.e);
            }
         }
      } else {
         
         currentShape.sizeByMousePos(x(mouseDownEvent), y(mouseDownEvent), x(event.e), y(event.e));
         canvas.renderAll();
      }
   }, 'mouse:up': function() {<commit_msg>Drag: remove 'select' mode<commit_after>/*************
 * Marker Creation Interface code
 */
function setupMarkerCreation(markupBuilder) {
   var enabled = false,
       dragging = false,
       canvas = markupBuilder.fabricCanvas,
       mouseDownEvent,
       color,
       currentShape,
       shapeMode = Enum(['circle', 'rectangle']);

   canvas.on({
   'mouse:down': function(event) {
      if (!enabled) return;
      mouseDownEvent = event.e;
   },'mouse:move': function(event) {
      if (!enabled) return;
      if (!dragging) {
         if (mouseDownEvent && !canvas.getActiveObject()) {
            var dragDist = distance(mouseDownEvent, event.e);
            if (dragDist > 10) {
               startDragging(mouseDownEvent, event.e);
            }
         }
      } else {
         
         currentShape.sizeByMousePos(x(mouseDownEvent), y(mouseDownEvent), x(event.e), y(event.e));
         canvas.renderAll();
      }
   }, 'mouse:up': function() {
{'fraction_non_alphanumeric': 0.14421052631578948, 'fraction_numerical': 0.002105263157894737, 'mean_word_length': 2.3586572438162543, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '461485', 'n_tokens_mistral': 559, 'n_tokens_neox': 544, 'n_words': 113}