Uploaded image for project: 'Atlas Module'
  1. Atlas Module
  2. ATLAS-163

Do not begin fading markers until a year has passed

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: TBD
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Complexity:
      Low

      Description

      The initial fading algorithm fades 25% every 6 months after the last update. This means markers begin fading after 6 months and disappear after 2 years. Experience shows this is overly aggressive for the community.

      Refactor the fading algorithm to delay fading for a year.

      function getFadeGroup(site) {
        var ageInMonths = Math.max(0, (new Date().getTime() - dateForSite(site)) / 2592000000); // milliseconds in 30 days
        var fadeGroup = Math.floor(ageInMonths / 6);
        return Math.min(fadeGroup, 4); // higher index == more transparent (max is 4)
      }

      to something like this:

      function getFadeGroup(site) {
        var ageInMonths = Math.max(0, (new Date().getTime() - dateForSite(site)) / 2592000000); // milliseconds in 30 days
        var fadeGroup = ageInMonths <= 12 ? 0 : Math.floor((ageInMonths-6) / 6); // after 1 year, +1 every 6 months
        return Math.min(fadeGroup, 4); // higher index == more transparent (max is 4)
      }

      And don't forget to update the fading tip accordingly to something like:

      var fadeHtml = "<div class='toggle' id='fadeInfo'> Sites that have not been updated for more than a year will begin to fade away. ";
      

       

       

        Attachments

          Activity

            People

            Assignee:
            heliostrike Sai Sandeep Mutyala
            Reporter:
            burke Burke Mamlin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: