- Bugfixes

- updated "notice" panel for upcoming release
This commit is contained in:
Exodus4D
2017-04-24 21:03:41 +02:00
parent a177be6246
commit c5ea4029f5
9 changed files with 90 additions and 26 deletions

View File

@@ -1,5 +1,5 @@
/**
* map overlay functions
* map overlay functions for "Near by" table
* Created by Exodus on 13.04.2017.
*/
@@ -34,10 +34,7 @@ define([
tableCellEllipsisClass: 'pf-table-cell-ellipsis',
tableCellEllipsis80Class: 'pf-table-cell-80',
tableCellEllipsis90Class: 'pf-table-cell-90',
// default "search" radius (jumps) for "near by" pilots
jumps: 3
tableCellEllipsis90Class: 'pf-table-cell-90'
};
/**
@@ -322,7 +319,7 @@ define([
}).append(
$('<span>', {
class: ['badge', 'txt-color', 'txt-color-grayLight'].join(' '),
text: config.jumps
text: MapUtil.config.defaultLocalJumpRadius
}).attr('title', 'jumps')
)

View File

@@ -2894,7 +2894,7 @@ define([
currentSystemData = currentSystemData[0];
// check for active users "near by" (x jumps radius)
let nearBySystemData = Util.getNearBySystemData(currentSystemData, currentMapData, 3);
let nearBySystemData = Util.getNearBySystemData(currentSystemData, currentMapData, MapUtil.config.defaultLocalJumpRadius);
let nearByCharacterData = Util.getNearByCharacterData(nearBySystemData, userData.data.systems);
// update "local" table in overlay

View File

@@ -12,6 +12,7 @@ define([
let config = {
mapSnapToGridDimension: 20, // px for grid snapping (grid YxY)
defaultLocalJumpRadius: 3, // default search radius (in jumps) for "near by" pilots
// local storage
characterLocalStoragePrefix: 'character_', // prefix for character data local storage key

View File

@@ -1822,7 +1822,7 @@ define([
* @param foundSystemIds
* @returns {{systemData: *, tree: {}}}
*/
let getNearBySystemData = (currentSystemData, currentMapData, jumps, foundSystemIds = []) => {
let getNearBySystemData = (currentSystemData, currentMapData, jumps, foundSystemIds = {}) => {
// look for systemData by ID
let getSystemData = (systemId) => {
@@ -1836,7 +1836,7 @@ define([
};
// skip systems that are already found in recursive calls
foundSystemIds.push(currentSystemData.id);
foundSystemIds[currentSystemData.id] = {distance: jumps};
let nearBySystems = {
systemData: currentSystemData,
@@ -1844,7 +1844,7 @@ define([
};
jumps--;
if(jumps > 0){
if(jumps >= 0){
for(let i = 0; i < currentMapData.data.connections.length; i++){
let connectionData = currentMapData.data.connections[i];
let type = ''; // "source" OR "target"
@@ -1856,7 +1856,10 @@ define([
if(
type &&
foundSystemIds.indexOf(connectionData[type]) === -1
(
foundSystemIds[connectionData[type]] === undefined ||
foundSystemIds[connectionData[type]].distance < jumps
)
){
let newSystemData = getSystemData(connectionData[type]);
if(newSystemData){
@@ -1888,9 +1891,40 @@ define([
return [];
};
let filterFinalCharData = function(tmpFinalCharData){
return this.id !== tmpFinalCharData.id;
};
let characterData = getCharacterDataBySystemId(nearBySystems.systemData.systemId);
if(characterData.length){
// filter (remove) characterData for "already" added chars
characterData = characterData.filter(function(tmpCharacterData, index, allData){
let keepData = true;
for(let tmpJump in data) {
// just scan systems with > jumps than current system
if(tmpJump > jumps){
let filteredFinalData = data[tmpJump].filter(filterFinalCharData, tmpCharacterData);
if(filteredFinalData.length > 0){
data[tmpJump] = filteredFinalData;
}else{
delete data[tmpJump];
}
}else{
for(let k = 0; k < data[tmpJump].length; k++){
if(data[tmpJump][k].id === tmpCharacterData.id){
keepData = false;
break;
}
}
}
}
return keepData;
});
data[jumps] = data[jumps] ? data[jumps] : [];
data[jumps] = [...data[jumps], ...characterData];
}

View File

@@ -1,5 +1,5 @@
/**
* map overlay functions
* map overlay functions for "Near by" table
* Created by Exodus on 13.04.2017.
*/
@@ -34,10 +34,7 @@ define([
tableCellEllipsisClass: 'pf-table-cell-ellipsis',
tableCellEllipsis80Class: 'pf-table-cell-80',
tableCellEllipsis90Class: 'pf-table-cell-90',
// default "search" radius (jumps) for "near by" pilots
jumps: 3
tableCellEllipsis90Class: 'pf-table-cell-90'
};
/**
@@ -322,7 +319,7 @@ define([
}).append(
$('<span>', {
class: ['badge', 'txt-color', 'txt-color-grayLight'].join(' '),
text: config.jumps
text: MapUtil.config.defaultLocalJumpRadius
}).attr('title', 'jumps')
)

View File

@@ -2894,7 +2894,7 @@ define([
currentSystemData = currentSystemData[0];
// check for active users "near by" (x jumps radius)
let nearBySystemData = Util.getNearBySystemData(currentSystemData, currentMapData, 3);
let nearBySystemData = Util.getNearBySystemData(currentSystemData, currentMapData, MapUtil.config.defaultLocalJumpRadius);
let nearByCharacterData = Util.getNearByCharacterData(nearBySystemData, userData.data.systems);
// update "local" table in overlay

View File

@@ -12,6 +12,7 @@ define([
let config = {
mapSnapToGridDimension: 20, // px for grid snapping (grid YxY)
defaultLocalJumpRadius: 3, // default search radius (in jumps) for "near by" pilots
// local storage
characterLocalStoragePrefix: 'character_', // prefix for character data local storage key

View File

@@ -1822,7 +1822,7 @@ define([
* @param foundSystemIds
* @returns {{systemData: *, tree: {}}}
*/
let getNearBySystemData = (currentSystemData, currentMapData, jumps, foundSystemIds = []) => {
let getNearBySystemData = (currentSystemData, currentMapData, jumps, foundSystemIds = {}) => {
// look for systemData by ID
let getSystemData = (systemId) => {
@@ -1836,7 +1836,7 @@ define([
};
// skip systems that are already found in recursive calls
foundSystemIds.push(currentSystemData.id);
foundSystemIds[currentSystemData.id] = {distance: jumps};
let nearBySystems = {
systemData: currentSystemData,
@@ -1844,7 +1844,7 @@ define([
};
jumps--;
if(jumps > 0){
if(jumps >= 0){
for(let i = 0; i < currentMapData.data.connections.length; i++){
let connectionData = currentMapData.data.connections[i];
let type = ''; // "source" OR "target"
@@ -1856,7 +1856,10 @@ define([
if(
type &&
foundSystemIds.indexOf(connectionData[type]) === -1
(
foundSystemIds[connectionData[type]] === undefined ||
foundSystemIds[connectionData[type]].distance < jumps
)
){
let newSystemData = getSystemData(connectionData[type]);
if(newSystemData){
@@ -1888,9 +1891,40 @@ define([
return [];
};
let filterFinalCharData = function(tmpFinalCharData){
return this.id !== tmpFinalCharData.id;
};
let characterData = getCharacterDataBySystemId(nearBySystems.systemData.systemId);
if(characterData.length){
// filter (remove) characterData for "already" added chars
characterData = characterData.filter(function(tmpCharacterData, index, allData){
let keepData = true;
for(let tmpJump in data) {
// just scan systems with > jumps than current system
if(tmpJump > jumps){
let filteredFinalData = data[tmpJump].filter(filterFinalCharData, tmpCharacterData);
if(filteredFinalData.length > 0){
data[tmpJump] = filteredFinalData;
}else{
delete data[tmpJump];
}
}else{
for(let k = 0; k < data[tmpJump].length; k++){
if(data[tmpJump][k].id === tmpCharacterData.id){
keepData = false;
break;
}
}
}
}
return keepData;
});
data[jumps] = data[jumps] ? data[jumps] : [];
data[jumps] = [...data[jumps], ...characterData];
}

View File

@@ -7,10 +7,10 @@
<div class="panel-body no-padding text-align-center">
<div class="price-features" style="min-height: inherit;">
<ul class="list-unstyled text-left">
<li><i class="fa fa-fw fa-angle-right"></i>NEW signature overlays (signatures can be bind to connections) <a target="_blank" href="https://www.youtube.com/watch?v=5kp3CBx6998">Youtube</a></li>
<li><i class="fa fa-fw fa-angle-right"></i>NEW wormhole overlays ("updated"/"created" information)</li>
<li><i class="fa fa-fw fa-angle-right"></i>NEW keyboard shortcuts (beta)</li>
<li><i class="fa fa-fw fa-angle-right"></i>Added ~80 missing static WHs for "Shattered wormholes"</li>
<li><i class="fa fa-fw fa-angle-right"></i>New "<em><a target="_blank" href="https://github.com/exodus4d/pathfinder/issues/481#issue-223584078">Near by</a></em>" map overlay shows active pilots within 3 jumps around your current location</li>
<li><i class="fa fa-fw fa-angle-right"></i>Switch to <em>CCPs</em> new <a target="_blank" href="https://community.eveonline.com/news/dev-blogs/introducing-esi/">ESI API</a>. Replaces CREST API.</li>
<li><i class="fa fa-fw fa-angle-right"></i>New UI options added. E.g. Remote open inGame information windows</li>
<li><i class="fa fa-fw fa-angle-right"></i>Added new filter option for "<em>Frigat wormholes</em>" to route finder</li>
<li><i class="fa fa-fw fa-angle-double-right"></i>Complete <a href="javascript:void(0)" class="pf-navbar-version-info">changelog</a></li>
</ul>
</div>