45 Commits

Author SHA1 Message Date
Xelio
c127bf0b6d New feature: Highlight resonators of selected portal 2013-02-16 00:01:59 +08:00
Stefan Breunig
6de035b0ab likely fix #173
If I understood everything correctly, the reason was that the for-loop
doesn’t create a separate context, thus the reference to r was made for
the whole renderResonator function. This obviously references the latest
r after the loop has finished. Switching this to $.each where each
iteration is a new anonymous function and thus a closure, r is referenced
correctly.

Please reopen if this does not fix the problem.
2013-02-15 16:04:10 +01:00
Stefan Breunig
eb23123ae8 resos should not be clickable 2013-02-14 11:19:22 +01:00
Stefan Breunig
4ceacf719d Merge pull request #155 from Xelio/patch-reso-line-tune
Resonator line tuning
2013-02-13 23:27:21 -08:00
Xelio
767354b83f Resonator line tuning - 2
Lower opacity 0.35 -> 0.25
Tweak color to a bit lighter #FF7700 -> #FFA000
2013-02-14 12:43:41 +08:00
Xelio
c9e2c12784 Resonator line tuning - bug fix
Need to draw from portal for new dashArray to work
2013-02-14 03:40:32 +08:00
Xelio
24c5d45efc Resonator line tuning
Change color #FFFFFF -> #FF7700
Change opactiy 0.2 -> 0.35
Change dashArray to move line out of portal circle
2013-02-14 03:29:39 +08:00
Stefan Breunig
841223f837 the patches to avoid re-rendering would not update the portal details
if there were only minor changes (resos destroyed or energy level
changed). This likely lead to the sidebar showing outdates information.
The patch should solve #154, but please check carefully.
2013-02-13 20:20:29 +01:00
Stefan Breunig
b3ec8ccd48 draw lines between portals and resonators (fixes #88 #151)
The lines look great against a dark background but are barely visible against
OSM CloudMade Minimal. Not sure what could be done about that though, other
than drawing differently for each.
2013-02-13 19:40:00 +01:00
vita10gy
4358dbfd77 Merge remote-tracking branch 'upstream/gh-pages' into weak-portal-plugin 2013-02-12 22:14:46 -06:00
Stefan Breunig
ff28f8d5ed Merge pull request #143 from Xelio/patch-map-resonator-bug-1-rebased
Add resonator re-render logic
2013-02-12 19:15:19 -08:00
Xelio
4ca80b877e Add resonator re-render logic
Resonator will re-render if it's level/energy/distance changed
Bring portal to front after resonators re-rendered.
2013-02-13 10:09:50 +08:00
Stefan Breunig
139e06d86c fix typo 2013-02-12 23:12:41 +01:00
vita10gy
195dc611b2 Weak Portal Plugin
At a glance high level indicator of portals in disrepair. Opacity is
used to denote how much it's hurting. (Bright means needs the most
attention.) Factors in current energy, missing shields, or missing
resonators. Red means it needs attention. Orange means the same thing,
except that it's down at least one resonator.

I realise this is in opposition to game convention where dim == almost
dead, but I tried it that way, and it just made no sense to me to do it
that way. The whole point is a high level way to quickly identify
portals that most need repairing. If opacity isn't done this way your
eyes are most drawn to the portals that least need your attention.
2013-02-12 00:21:49 -06:00
Stefan Breunig
dcc860fa14 remove superfluous delete function 2013-02-11 19:48:23 +01:00
Stefan Breunig
4ecb7c66d7 make uniqueArray its own function 2013-02-11 16:51:14 +01:00
Stefan Breunig
bbdd0ac520 Merge branch '107' of git://github.com/phoenixsong6/ingress-intel-total-conversion into phoenixsong6-107 2013-02-11 16:46:43 +01:00
Eashwar Ranganathan
fa940341e3 Merge field GUIDs instead of overwriting them for portal field counts 2013-02-11 02:45:27 -08:00
Stefan Breunig
64bf9e1f70 this patch fixes several issues:
fix #103 by always re-rendering resonator details.
  A follow-up patch could also avoid re-rendering resos if they did not
  change. Given that there are only a few on these high zoom levels, perf
  improvement might be negligible though.
- fix #91. This avoids drawing portals/links/fields again if they are
  hidden. The patch looks for those hidden entities and either removes
  them before re-drawing (portals) or skips re-drawing altogether:
- Fields and Links are assumed to never change as long as their GUID is
  the same. This avoids deleting and re-creating links/fields all the
  time and might improve speed. Haven’t tested though.
2013-02-11 11:30:56 +01:00
Stefan Breunig
210cbbfcc5 increase max size for portals, otherwise unclaimed ones are really hard to see 2013-02-11 00:05:12 +01:00
Stefan Breunig
1bbbe05a86 add hooks framework and add hook for portal added (fixes #87) 2013-02-10 23:07:33 +01:00
Stefan Breunig
d0df5b84a3 probably fix #90 2013-02-10 22:30:24 +01:00
Stefan Breunig
0bd102e823 avoid rendering portal details for hidden portals. They do not get updated and thus outdated info might be shown. 2013-02-10 21:13:17 +01:00
Stefan Breunig
8c7e63a7f8 don’t remove & re-render portals if nothing changed for them. 2013-02-10 20:50:31 +01:00
Stefan Breunig
a6ae188548 size portals by their level. Slightly modified patch by OshiHidra. Fixes #24, #29 2013-02-10 19:45:25 +01:00
Stefan Breunig
fb656a4982 Merge pull request #78 from Xelio/patch-map-resonator
draw resonators for each portal on map for high zoom levels (17+). Patch by Xelio.
2013-02-10 10:26:52 -08:00
Xelio
7b7f229ac5 Change resonators render min zoom level and radius
Change:
Resonators render minimum zoom level 16 -> 17
Resonators render radius 4 -> 3
Some cleanup and performance tuning
2013-02-11 02:22:35 +08:00
Xelio
36aabc3216 Comment correction
Correct comment of "portalResonatorGuid"
2013-02-10 22:58:08 +08:00
Xelio
370f34a793 Change guid format of resonator
Change:
Guid format of resonator change to following,
[portal guid]-resonator-[slot]

Some code cleanup
2013-02-10 22:52:11 +08:00
Xelio
6936ef1d05 Resonators deletion of zoom level move
Change:
Move resonators deletion to 'zoomend' event of map.
Some clean up of code.
2013-02-10 22:23:01 +08:00
Xelio
f781c6ebd4 Resonators deletion of portal move
Move Resonators deletion to 'remove' event of portal
2013-02-10 21:14:54 +08:00
Xelio
444bcce988 Code cleanup and minor change
Change:
Code cleanup
Loop over all portalsLayers when delete resonator
2013-02-10 20:58:15 +08:00
Stefan Breunig
d5285ca26c fix fields not being cleared from the map if they weren’t used for field counting 2013-02-10 09:51:02 +01:00
Xelio
eecec0b4a4 Move resonator layer back to layerGroup "portalsLayers",
to make it work with portal level filter.
And modify cleanup code to work with this change.
2013-02-10 16:06:13 +08:00
Xelio
c34d7ee3a2 Resonator on map
Change:
Add "RESONATOR_DISPLAY_ZOOM_LEVEL" to control minimum zoom level resonator will display
Add layerGroup "resonatorsLayers" to draw resonators on it.
Add "window.resonators" to store references to resonators on map

Resonator will have guid of portal with ".11" or ".12" replaced with ".r0"~".r7"
Add function "window.renderResontor" to draw resonators (use sorgo's code [sorgo](https://github.com/sorgo))
"window.renderPortal" will call "window.renderResontor" before add portal to portalsLayers
Change "window.removeByGuid" to handle resonators
Change "window.cleanUp" to handle resonators cleanup
2013-02-10 14:12:26 +08:00
Stefan Breunig
53ff334fe1 move getTypeByGuid to utils_misc.js and clean it up a little 2013-02-10 00:26:27 +01:00
Eashwar Ranganathan
dc4cea2ed7 Display control field count 2013-02-09 15:13:58 -08:00
Stefan Breunig
f5edc84635 add ability to filter by portal level. You can access the feature from the layer selector just as before. Fixes #8 and some of #12 2013-02-08 17:39:37 +01:00
Stefan Breunig
71bfeff678 remove array with portal details references that might have been leaking. Instead, store the details with the rendered portals so removal is handled automatically 2013-02-04 16:15:25 +01:00
Stefan Breunig
f92c963a54 finish chat feature; hide low level portal on zoom out; introduce render limit 2013-02-04 02:52:24 +01:00
Stefan Breunig
ecfaca7f9b more chat related stuff. public user chat and message posting is still missing though 2013-02-03 19:44:35 +01:00
Stefan Breunig
b7f1270ff6 make faction chat display almost work 2013-02-03 13:19:56 +01:00
Stefan Breunig
0a2890f196 improve actual and perceived performance 2013-02-02 00:35:15 +01:00
Stefan Breunig
e83a582f7c fix map status sometimes being wrong 2013-02-01 15:37:07 +01:00
Stefan Breunig
a07ee0cc3d so others may contribute 2013-02-01 13:11:14 +01:00