Giter VIP home page Giter VIP logo

Comments (5)

sndirsch avatar sndirsch commented on June 12, 2024

The above is with current Desktop version IITC-CE v0.33.0 and 'Highlight portals missing resonators' plugin version 0.2.0.

Things look fine with Android Version 0.32.1 for some reason.

image

from ingress-intel-total-conversion.

sndirsch avatar sndirsch commented on June 12, 2024

Going back to old code fixes it for me.

0001-highlight-missing-resonators.js-fixes-issue-590.patch.txt

from ingress-intel-total-conversion.

sndirsch avatar sndirsch commented on June 12, 2024
From 0e07c62a59aa1372f2715a5fa48a54f878e47041 Mon Sep 17 00:00:00 2001
From: Stefan Dirsch <[email protected]>
Date: Mon, 17 Oct 2022 17:08:59 +0200
Subject: [PATCH] highlight-missing-resonators.js: fixes issue #590

Going back to old code fixes the issue for me ...
---
 plugins/highlight-missing-resonators.js | 19 +++++--------------
 1 file changed, 5 insertions(+), 14 deletions(-)

diff --git a/plugins/highlight-missing-resonators.js b/plugins/highlight-missing-resonators.js
index 4eabbf94..6fd7583e 100644
--- a/plugins/highlight-missing-resonators.js
+++ b/plugins/highlight-missing-resonators.js
@@ -7,14 +7,6 @@
 /* exported setup --eslint */
 /* global L, TEAM_NONE */
 // use own namespace for plugin
-var highlightMissingResonators = {};
-window.plugin.highlightMissingResonators = highlightMissingResonators;
-
-highlightMissingResonators.styles = {
-  common: {
-    fillcolor: 'red'
-  }
-};
 
 function missingResonators (data) {
 
@@ -23,13 +15,12 @@ function missingResonators (data) {
 
     if (res_count !== undefined && res_count < 8) {
       var fill_opacity = ((8-res_count)/8)*.85 + .15;
-      // Hole per missing resonator
-      var dash = new Array((8 - res_count) + 1).join('1,4,') + '100,0';
+      var color = 'red';
+      var params = {fillColor: color, fillOpacity: fill_opacity};
 
-      var params = L.extend({},
-        highlightMissingResonators.styles.common,
-        {fillOpacity: fill_opacity, dashArray: dash}
-      );
+      // Hole per missing resonator
+      var dash = new Array((8 - res_count) + 1).join("1,4,") + "100,0"
+      params.dashArray = dash;
 
       data.portal.setStyle(params);
     }
-- 
2.35.3

from ingress-intel-total-conversion.

le-jeu avatar le-jeu commented on June 12, 2024

So basically, the issue is about the portal not being red while missing resonators.
This is due to a typo in the code fillcolor vs fillColor

from ingress-intel-total-conversion.

sndirsch avatar sndirsch commented on June 12, 2024

@le-jeu Thanks a lot! Sorry, I missed your PR. Removed mine. It was incomplete anyway as I see now when looking at yours ...

from ingress-intel-total-conversion.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.