Commit Graph

62 Commits

Author SHA1 Message Date
a922bd36bf Adding hook portalDataLoaded
- portalDataLoaded is called during the
code/map_data.js#handleDataResponse to allow plugins to manipulate the
portals prior to rendering.
2013-02-19 22:35:32 -08:00
5bc83953a1 Merge pull request #186 from Xelio/patch-selected-portal-unselect-bug
Bug fix: selected portal unselect if portal re-render
2013-02-16 06:57:12 -08:00
fd7940c2ae Bug Fix: selected portal unselect if portal re-render
Add a checking: if portal is not visible on map, don't preserve "selectedPortal"
2013-02-16 22:38:43 +08:00
6a85f34725 use identity comparator 2013-02-16 15:12:06 +01:00
55506b7207 Bug fix: selected portal unselect if portal re-render
Preserve and restore "selectedPortal" between re-render
2013-02-16 21:33:29 +08:00
346d3ae0a1 implement basic support for smartphones 2013-02-16 13:52:17 +01:00
05c716d12e Merge pull request #183 from Xelio/patch-reso-update-delete
Bug fix: resonator update should remove old resonator
2013-02-16 04:20:30 -08:00
9ef8448d22 Bug fix: resonator update should remove old resonator
"window.renderResonators" should remove resonator if "isSameResonator()" return false.
2013-02-16 20:03:27 +08:00
e1fd13e4af print more info for duplicate resos (see #182) 2013-02-16 12:53:30 +01:00
4e837a4084 maybe related to #182 2013-02-16 12:50:32 +01:00
e9fd2e1a2e ensure portal is rendered above resos 2013-02-15 19:12:15 +01:00
e69ba16a23 draw resonator lines below resonators when selecting a portal. Also reduce code duplication 2013-02-15 19:01:18 +01:00
5bde912c7a Code restructure - 4 2013-02-16 01:35:34 +08:00
d632fdd2d3 Code restructure - 3 2013-02-16 01:28:19 +08:00
65b0e0113b Code restructure - 2 2013-02-16 01:19:36 +08:00
eab812fbf6 Code restructure 2013-02-16 01:16:20 +08:00
1ed2ee8e8c Performance tuning
Merge multiple setStyle into one command
2013-02-16 00:34:02 +08:00
c127bf0b6d New feature: Highlight resonators of selected portal 2013-02-16 00:01:59 +08:00
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
eb23123ae8 resos should not be clickable 2013-02-14 11:19:22 +01:00
4ceacf719d Merge pull request #155 from Xelio/patch-reso-line-tune
Resonator line tuning
2013-02-13 23:27:21 -08:00
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
c9e2c12784 Resonator line tuning - bug fix
Need to draw from portal for new dashArray to work
2013-02-14 03:40:32 +08:00
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
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
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
4358dbfd77 Merge remote-tracking branch 'upstream/gh-pages' into weak-portal-plugin 2013-02-12 22:14:46 -06:00
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
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
139e06d86c fix typo 2013-02-12 23:12:41 +01:00
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
dcc860fa14 remove superfluous delete function 2013-02-11 19:48:23 +01:00
4ecb7c66d7 make uniqueArray its own function 2013-02-11 16:51:14 +01:00
bbdd0ac520 Merge branch '107' of git://github.com/phoenixsong6/ingress-intel-total-conversion into phoenixsong6-107 2013-02-11 16:46:43 +01:00
fa940341e3 Merge field GUIDs instead of overwriting them for portal field counts 2013-02-11 02:45:27 -08:00
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
210cbbfcc5 increase max size for portals, otherwise unclaimed ones are really hard to see 2013-02-11 00:05:12 +01:00
1bbbe05a86 add hooks framework and add hook for portal added (fixes #87) 2013-02-10 23:07:33 +01:00
d0df5b84a3 probably fix #90 2013-02-10 22:30:24 +01:00
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
8c7e63a7f8 don’t remove & re-render portals if nothing changed for them. 2013-02-10 20:50:31 +01:00
a6ae188548 size portals by their level. Slightly modified patch by OshiHidra. Fixes #24, #29 2013-02-10 19:45:25 +01:00
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
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
36aabc3216 Comment correction
Correct comment of "portalResonatorGuid"
2013-02-10 22:58:08 +08:00
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
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
f781c6ebd4 Resonators deletion of portal move
Move Resonators deletion to 'remove' event of portal
2013-02-10 21:14:54 +08:00
444bcce988 Code cleanup and minor change
Change:
Code cleanup
Loop over all portalsLayers when delete resonator
2013-02-10 20:58:15 +08:00
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