Skip to content
This repository was archived by the owner on Jul 6, 2022. It is now read-only.

Commit 0167bb1

Browse files
committed
more map ui tweaking.
1 parent e123473 commit 0167bb1

4 files changed

Lines changed: 27 additions & 11 deletions

File tree

app/js/SystemMap.js

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ var SystemMap = {
7676

7777
draw: function() {
7878
// Change this to globally adjust minimum node distance and system [x,y] scale
79-
const SCALING_FACTOR = 0.75;
79+
const SCALING_FACTOR = 0.85;
8080

8181
var svg = d3.select("#system-map")
8282
.attr("width", Data.ui.map.width())
@@ -170,16 +170,28 @@ var SystemMap = {
170170

171171
node_groups.append("text")
172172
.attr("class", "hostiles")
173-
.attr("text-anchor", "middle")
173+
.attr("text-anchor", "left")
174+
.attr("alignment-baseline", "left")
174175
.attr("vector-effect", "non-scaling-stroke")
175-
.attr("alignment-baseline", "middle")
176-
.attr("x", rect_width / 2)
177-
.attr("y", 25)
176+
.attr("x", 0)
177+
.attr("y", 30)
178178
.text(function(n) {
179179
var count = SystemMap.hostile_count(n.system)
180-
return (count > 0) ? count + " " + UI.mapUnicode(['Hostile']) : "";
180+
return (count > 0) ? count : "";
181181
});
182-
182+
183+
node_groups.append("text")
184+
.attr("class", "faded")
185+
.attr("text-anchor", "right")
186+
.attr("alignment-baseline", "right")
187+
.attr("vector-effect", "non-scaling-stroke")
188+
.attr("x", rect_width / 1.15)
189+
.attr("y", 30)
190+
.text(function(n) {
191+
var count = SystemMap.faded_count(n.system)
192+
return (count > 0) ? count : "";
193+
});
194+
183195
node_groups.on('click', function(n) {
184196
SystemMap.updateInfo( n.system.name );
185197
});
@@ -346,7 +358,10 @@ var SystemMap = {
346358
if (results.id == Data.state.self.systemId) system.allow_report = true;
347359

348360
Data.ui.mapInfo.html( $(Data.templates.system_info(system)) );
349-
Data.ui.mapInfo.children('dl').fadeIn(Data.config.uiSpeed)
361+
Data.ui.mapInfo.children('div.details')
362+
.fadeIn(Data.config.uiSpeed)
363+
.delay(Data.config.alertStay)
364+
.fadeOut(Data.config.uiSpeed * 8);
350365
});
351366

352367
},

app/js/UI.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ Handlebars.registerHelper('ui_icon', function(icon) {
189189
if (icon == 'error') return 'exclamation-triangle';
190190
if (icon == 'fleet') return 'fighter-jet';
191191
if (icon == 'fleetCreated') return 'fighter-jet';
192-
if (icon == 'hostileFaded') return 'eye-slash';
192+
if (icon == 'hostileFaded') return 'clock-o';
193193
if (icon == 'hostileTimeout') return 'clock-o';
194194
if (icon == 'info') return 'question';
195195
if (icon == 'member') return 'user';

app/styles/main.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -511,6 +511,7 @@ rect.status-hostile { stroke: #d9534f; fill: #74312f; }
511511
fill: #fff;
512512
}
513513

514+
.node text.faded,
514515
.node text.advisories {
515516
font-family: FontAwesome;
516517
font-size: 1.25rem;

app/templates/hostile.hbs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
</td>
1212
<td class="ship-type" onClick="UIPanels.updateHostileDetailsPanel('{{characterId}}');">
1313
{{#if shipTypeId}}
14-
<i class="fa fa-eye"></i> <a href="javascript:CCPEVE.showInfo({{shipTypeId}});">{{shipType}}</a>
14+
<i class="fa fa-fighter-jet"></i> <a href="javascript:CCPEVE.showInfo({{shipTypeId}});">{{shipType}}</a>
1515
{{else}}
16-
<i class="fa fa-eye-slash"></i> Non Visual
16+
Non Visual
1717
{{/if}}
1818
{{#if isFaded}}
1919
<i class="fa fa-clock-o"></i> Faded

0 commit comments

Comments
 (0)