<commit_before>(($) ->

  # array que guardará todos os timeouts
  timeouts = []



  Newsfeed =


    ###
    Inicia as funções
    ###
    init: ->
      Newsfeed.eventEvents()
      Newsfeed.userEvent()
      Newsfeed.createMap()
      Newsfeed.fixingMapOnScroll()
      return



    createMap: ->
      newMap = ->
        new Gmaps(gon.latitude, gon.longitude)
        return

      setTimeout(newMap, 650)
      return



    eventEvents: ->

      # event mouseenter
      $(".event .panel").mouseenter ->
        # limpa o timeout
        i = 0
        while i < timeouts.length
          clearTimeout timeouts[i]
          i++

        timeouts = []

        # mostra a legenda
        $(this).find(".letter").fadeIn("fast")

        # pega a letra
        letra = $(this).find(".letter").text()

        $(".SidebarMap-neighborhoodCount").hide()

        # mostra as infos
        $(".SidebarMap-infos").filter(":not(:animated)").fadeIn 200

        # mostra o nome do evento no mapa
        $(".address").fadeIn("fast").text($(this).attr("address"))

        # mostra o a distância de ônibus
        $(".js-distanceWithWalking .data").fadeIn("fast").text($(this).attr("walk"))

        # mostra o a distância de ônibus
        $(".js-distanceWithBike .data").fadeIn("fast").text($(this).attr("bike"))

        # mostra o a distância de ônibus
        $(".js-distanceWithBus .data").fadeIn("fast").text($(this).attr("bus"))

        # mostra o a distância de ônibus
        $(".js-distanceWithCar .data").fadeIn("fast").text($(this).attr("car"))

        Gmaps.centralizeMapTo($(this).attr("latitude"), $(this).attr("longitude"))

        return


      # event mouseleave
      $(".event .panel").mouseleave ->
        $(".infobox").hide().text("")


        # esconde a legenda
        $(this).find(".letter").fadeOut("fast")

        latLng = new google.maps.LatLng(gon.latitude, gon.longitude)
        marker = $("#map").gmap3(get:
          id: $(this).attr "letter"
        )

        map = $("#map").gmap3("get")

        mostraNeighborhoodCount = ->
          $(".SidebarMap-neighborhoodCount").show()
          return

        # delay para ajustar o centro do mapa
        pan = ->
          map.centralizeMapTo(latLng)
          return

        escondeInfos = ->
          $(".SidebarMap-infos").hide()
          return

        timeouts.push(setTimeout(pan, 6500))
        timeouts.push(setTimeout(escondeInfos, 450))
        timeouts.push(setTimeout(mostraNeighborhoodCount, 460))


        return

      return





    userEvent: ->
      # map mouseenter
      $("#map").mouseenter ->
        # limpa o timeout
        i = 0
        while i < timeouts.length
          clearTimeout timeouts[i]
          i++
<commit_msg>Fix: panto on map when user mouse over the event<commit_after>(($) ->

  # array que guardará todos os timeouts
  timeouts = []



  Newsfeed =


    ###
    Inicia as funções
    ###
    init: ->
      Newsfeed.eventEvents()
      Newsfeed.userEvent()
      Newsfeed.createMap()
      Newsfeed.fixingMapOnScroll()
      return



    createMap: ->
      newMap = ->
        new Gmaps(gon.latitude, gon.longitude)
        return

      setTimeout(newMap, 650)
      return



    eventEvents: ->

      # event mouseenter
      $(".event .panel").mouseenter ->
        # limpa o timeout
        i = 0
        while i < timeouts.length
          clearTimeout timeouts[i]
          i++

        timeouts = []

        # mostra a legenda
        $(this).find(".letter").fadeIn("fast")

        # pega a letra
        letra = $(this).find(".letter").text()

        $(".SidebarMap-neighborhoodCount").hide()

        # mostra as infos
        $(".SidebarMap-infos").filter(":not(:animated)").fadeIn 200

        # mostra o nome do evento no mapa
        $(".address").fadeIn("fast").text($(this).attr("address"))

        # mostra o a distância de ônibus
        $(".js-distanceWithWalking .data").fadeIn("fast").text($(this).attr("walk"))

        # mostra o a distância de ônibus
        $(".js-distanceWithBike .data").fadeIn("fast").text($(this).attr("bike"))

        # mostra o a distância de ônibus
        $(".js-distanceWithBus .data").fadeIn("fast").text($(this).attr("bus"))

        # mostra o a distância de ônibus
        $(".js-distanceWithCar .data").fadeIn("fast").text($(this).attr("car"))

        Gmaps.panTo($(this).attr("latitude"), $(this).attr("longitude"))

        return


      # event mouseleave
      $(".event .panel").mouseleave ->
        $(".infobox").hide().text("")


        # esconde a legenda
        $(this).find(".letter").fadeOut("fast")

        latLng = new google.maps.LatLng(gon.latitude, gon.longitude)
        marker = $("#map").gmap3(get:
          id: $(this).attr "letter"
        )

        map = $("#map").gmap3("get")

        mostraNeighborhoodCount = ->
          $(".SidebarMap-neighborhoodCount").show()
          return

        # delay para ajustar o centro do mapa
        pan = ->
          map.centralizeMapTo(latLng)
          return

        escondeInfos = ->
          $(".Side").hide()
          return

        timeouts.push(setTimeout(pan, 6500))
        timeouts.push(setTimeout(escondeInfos, 450))
        timeouts.push(setTimeout(mostraNeighborhoodCount, 460))


        return

      return





    userEvent: ->
      # map mouseenter
      $("#map").mouseenter ->
        # limpa o timeout
        i = 0
        while i < timeouts.length
          clearTimeout timeouts[i]
          i++

{'fraction_non_alphanumeric': 0.15404178019981835, 'fraction_numerical': 0.007266121707538601, 'mean_word_length': 1.9618074233458849, 'pattern_counts': {'":': 2, '<': 7, '<?xml version=': 0, '>': 27, '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': '5312517', 'n_tokens_mistral': 1818, 'n_tokens_neox': 1666, 'n_words': 331}