180 Commits

Author SHA1 Message Date
Xelio
5bde912c7a Code restructure - 4 2013-02-16 01:35:34 +08:00
Xelio
d632fdd2d3 Code restructure - 3 2013-02-16 01:28:19 +08:00
Xelio
65b0e0113b Code restructure - 2 2013-02-16 01:19:36 +08:00
Xelio
eab812fbf6 Code restructure 2013-02-16 01:16:20 +08:00
Xelio
1ed2ee8e8c Performance tuning
Merge multiple setStyle into one command
2013-02-16 00:34:02 +08:00
Xelio
c127bf0b6d New feature: Highlight resonators of selected portal 2013-02-16 00:01:59 +08:00
Stefan Breunig
6a5759f06c add workaround for #129 and see if that "solves" the issue 2013-02-15 16:23:31 +01:00
Stefan Breunig
f1467dd1e9 remove more deprecated stuff 2013-02-15 16:23:11 +01:00
Stefan Breunig
c7ef5e3334 git pushMerge branch 'gh-pages' of github.com:breunigs/ingress-intel-total-conversion into gh-pages 2013-02-15 16:07:42 +01: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
4d6e0b5ebb less fancy on mobile 2013-02-15 13:29:34 +01:00
Stefan Breunig
f18dc53529 Merge pull request #165 from jonatkins/permalinkfix
permalinks give a map zoomed in one level further
2013-02-15 00:14:48 -08:00
Peter Sorger
662214c853 fixed AP Gain calculation
sorry, I messed it up a bit while rewriting it to constants
issue #166
2013-02-15 08:50:15 +01:00
Jon Atkins
64a78076d8 fix permalink zoom level 2013-02-14 18:59:58 +00:00
Jon Atkins
750d01afcf fix permalink zoom level 2013-02-14 18:58:48 +00:00
Stefan Breunig
7d2a704c9c more perf on mobile 2013-02-14 19:21:21 +01:00
Stefan Breunig
98f22c4e48 see if this fixes the level misalignment 2013-02-14 19:04:31 +01:00
Stefan Breunig
1cf9418179 allow bundling resources and don’t try to load them from the internet 2013-02-14 14:34:54 +01:00
Stefan Breunig
eb23123ae8 resos should not be clickable 2013-02-14 11:19:22 +01:00
Stefan Breunig
99a4a884c9 fix #121 2013-02-14 08:51:00 +01:00
Stefan Breunig
485b1c543b fix #95 (thanks jonatkins) 2013-02-14 08:47:49 +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
3bbca39353 add sanity checks to lat/lng to avoid issues like #153 (fixes #153) 2013-02-13 20:01:44 +01:00
Stefan Breunig
a63370cae9 fix Leaflet not saving base layer properly 2013-02-13 19:52: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
Stefan Breunig
6cca87a1d9 fix left over typo from previous commit 2013-02-13 18:48:21 +01:00
Stefan Breunig
6ab87d13aa Merge branch 'gh-pages' of github.com:breunigs/ingress-intel-total-conversion into gh-pages 2013-02-13 18:11:53 +01:00
Stefan Breunig
5fb8a04147 Merge pull request #149 from sorgo/patch-2
Added capture AP to AP Gain
2013-02-13 08:51:33 -08:00
Stefan Breunig
1e6161ad2e make layerChooser available to plugins so they can add layers of their own 2013-02-13 17:44:41 +01:00
Stefan Breunig
cf17fef699 maybe fix #152 (haven’t checked) 2013-02-13 16:28:20 +01:00
Peter Sorger
d9463de1e4 typo 2013-02-13 16:17:31 +01:00
Peter Sorger
5876d0cab6 use constants 2013-02-13 16:10:24 +01:00
Peter Sorger
63127f7890 Added capture AP to AP Gain
Added AP for capturing a portal (500), deploying a resonator (8×125) and Competition bonus (250).
Actually no more shield AP's in Ingress.
2013-02-13 15:21:52 +01:00
Stefan Breunig
fbd892e88d also show anonymous messages such as 'field decyed'. Fixes #145 2013-02-13 12:36:06 +01:00
Stefan Breunig
164d067d4a fix scroll back issues for public chats 2013-02-13 12:35:51 +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
Stefan Breunig
ae65dff2d9 * ditch jQueryUI vanilla styles in favor of own ones.
* disable tracking for tooltips and make them behave more like regular ones
  (this also stops my fan from spinning up when using the intel map)

Improvements welcome. Tooltips are currently placed at the bottom of the
element instead of next to cursor. It seems it’s either tracking or placing
it not anywhere where one would expect a tooltip. I immediately regret
having chosen jQueryUI. It’s not very flexible and has awkward defaults.
2013-02-13 04:10:40 +01:00
Stefan Breunig
79b917c8f1 divider bar too short 2013-02-13 03:22:01 +01:00
Stefan Breunig
4f931a11c7 Merge pull request #142 from saithis/tooltip
Added jQuery UI tooltips; fixes #42; patch by saithis
2013-02-12 18:19:33 -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
360f6f8336 rework chat handling completely
The old system was getting too complicated to add new features to.
The new one should be easier to understand and will be explained
below. This patch should fix #140 and fix #16.

There are several places where new data requests may come from:
- chat.needMoreMessages checks if we are scrolled too far up or
  there is no scrollbar. It then requests new messages.
- scrolling up
- switching the chat tab via chat.chooser
- auto refresh
- once on boot
The latter two always request both types of chat.

Faction and public are handled the same way. Public is later split
into categories. I will explain the faction chat here because it’s
easier.

It starts in chat.requestFaction. This will initialize the query to
the server for data. The exact query is determined by chat.
genPostData. There can only be one faction chat request at a time.
Clearing on map move is handled automatically in code/requests.js.

Let’s assume the data query is successful. It is now passed to
chat.handleFaction which runs some basic checks before the data is
processed and stored in chat._factionData. This is done by chat.
writeDataToHash. The hash keys are the message GUIDs to avoid
duplicates. The hash values are an array of timestamp, processed
message and other meta data.

There is only one way to render faction chat, so data is directly
handed to chat.renderFaction which immediately hands it to chat
.renderData. renderData discards the GUIDs and sorts the values
by their timestamp. It then iterates over the data to insert
date break lines and finally renders the data in the DOM. It also
does some magic to keep the correct scrolling position.

Chat data will be cleared on map move or zoom. However, the
display is not refreshed, so the old, invalid chat data is still
displayed. Only once the data query is finished the data is
rendered. The upside is that small map operations within your
local area appear to never lose their chat data. Downside is that
there’s invalid chat for some time when changing cities.
2013-02-13 02:52:27 +01:00
Stefan Breunig
4c07fb12ae properly check if portal details are available 2013-02-13 02:49:13 +01:00
Stefan Breunig
847a3d5fc1 warn when chat message didn’t make it but the server actually send a response 2013-02-12 23:22:45 +01:00
saithis
039f9c14b5 * The jQuery UI js/css file is now taken from ajax.googleapis.com instead of code.jquery.com
* Table or not is now autodetected, removed data-tooltip attributes
* Empty table cells are now possible
* Removed duplicated \t's on some titles
* Some tooltip code cleanup
2013-02-12 23:16:12 +01:00
Stefan Breunig
139e06d86c fix typo 2013-02-12 23:12:41 +01:00