Skip to content
Snippets Groups Projects
Select Git revision
  • 1677b62e4b6ba8372c1bc5211580fb877d1621d9
  • v2018.2.x default
  • experimental
  • master
  • v2021.1.2-ffs
  • v2021.1.1-ffs
  • nrb/gluon-master-cpe510
  • v2021.1-ffs
  • v2020.2.3-ffs
  • nrbffs/fastd-remove-delay
  • v2020.2.2-ffs
  • v2020.2.1-ffs
  • v2020.2-ffs
  • v2020.2.x
  • v2020.1.3-ffs
  • v2020.1.1-ffs
  • v2020.1-ffs
  • v2019.1.2-ffs
  • v2019.1.1-ffs
  • nrb/test-radv-filter
  • v2019.1-ffs
  • nrbffs/netgear-ex6120
  • v2021.1.2-ffs0.2
  • v2021.1.2-ffs0.1
  • v2021.1.1-ffs0.4
  • v2021.1.1-ffs0.3
  • v2021.1.1-ffs0.2
  • v2021.1.1-ffs0.1
  • v2021.1-ffs0.1
  • v2020.2.3-ffs0.3
  • v2020.2.3-ffs0.2
  • v2020.2.3-ffs0.1
  • v2020.2.2-ffs0.1
  • v2020.2.1-ffs0.1
  • v2020.2-ffs0.1
  • v2020.2
  • v2020.2.x-ffs0.1
  • v2020.1.3-ffs0.1
  • v2020.1.1-ffs0.1
  • v2020.1-ffs0.1
  • v2019.1.2-ffs0.1
  • v2019.1.1-ffs0.1
42 results

0027-build-add-locking-for-downloads-fixes-race-conditions-with-multiple-variants.patch

Blame
  • Forked from firmware / FFS Gluon
    Source project has a limited visibility.
    clientlayer.js 1.76 KiB
    define(['leaflet', 'rbush', 'helper'],
      function (L, rbush, helper) {
        'use strict';
    
        return L.GridLayer.extend({
          mapRTree: function mapRTree(d) {
            return {
              minX: d.location.latitude, minY: d.location.longitude,
              maxX: d.location.latitude, maxY: d.location.longitude,
              node: d
            };
          },
          setData: function (data) {
            var rtreeOnlineAll = rbush(9);
    
            this.data = rtreeOnlineAll.load(data.nodes.all.filter(helper.online).filter(helper.hasLocation).map(this.mapRTree));
    
            // pre-calculate start angles
            this.data.all().forEach(function (n) {
              n.startAngle = (parseInt(n.node.node_id.substr(10, 2), 16) / 255) * 2 * Math.PI;
            });
            this.redraw();
          },
          createTile: function (tilePoint) {
            var tile = L.DomUtil.create('canvas', 'leaflet-tile');
    
            var tileSize = this.options.tileSize;
            tile.width = tileSize;
            tile.height = tileSize;
    
            if (!this.data) {
              return tile;
            }
    
            var ctx = tile.getContext('2d');
            var s = tilePoint.multiplyBy(tileSize);
            var map = this._map;
    
            var margin = 50;
            var bbox = helper.getTileBBox(s, map, tileSize, margin);
    
            var nodes = this.data.search(bbox);
    
            if (nodes.length === 0) {
              return tile;
            }
    
            var startDistance = 10;
    
            nodes.forEach(function (d) {
              var p = map.project([d.node.location.latitude, d.node.location.longitude]);
    
              p.x -= s.x;
              p.y -= s.y;
    
              ctx.beginPath();
              ctx.fillStyle = 'rgba(220, 0, 103, 0.7)';
              helper.positionClients(ctx, p, d.startAngle, d.node, startDistance);
              ctx.fill();
            });
    
    
            return tile;
          }
        });
      });