- New map option for inline system region names, closed #947
- Upgraded "[_jsPlumb_](http://jsplumb.github.io/jsplumb/home.html)" js lib `v2.9.3` → `v2.13.1` - Moved endpoint `/api/universe/systems` into new REST structure 'GET /api/rest/SystemSearch'
This commit is contained in:
@@ -14,7 +14,6 @@ use Exodus4D\Pathfinder\Data\File\FileHandler;
|
||||
use Exodus4D\Pathfinder\Model\AbstractModel;
|
||||
use Exodus4D\Pathfinder\Model\Pathfinder;
|
||||
use Exodus4D\Pathfinder\Model\Universe;
|
||||
use Exodus4D\Pathfinder\Exception;
|
||||
|
||||
/**
|
||||
* Map controller
|
||||
|
||||
82
app/Controller/Api/Rest/SystemSearch.php
Normal file
82
app/Controller/Api/Rest/SystemSearch.php
Normal file
@@ -0,0 +1,82 @@
|
||||
<?php
|
||||
|
||||
|
||||
namespace Exodus4D\Pathfinder\Controller\Api\Rest;
|
||||
|
||||
use Exodus4D\Pathfinder\Model;
|
||||
|
||||
class SystemSearch extends AbstractRestController {
|
||||
|
||||
/**
|
||||
* system data properties that will be returned
|
||||
* -> filter system data, save bandwidth
|
||||
*/
|
||||
const SYSTEM_DATA_KEYS = ['id', 'name', 'trueSec', 'security', 'effect', 'shattered'];
|
||||
|
||||
/**
|
||||
* max results per page
|
||||
*/
|
||||
const PAGE_SIZE_SYSTEMS = 50;
|
||||
|
||||
/**
|
||||
* @param \Base $f3
|
||||
* @param $params
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function get(\Base $f3, $params){
|
||||
$requestData = $this->getRequestData($f3);
|
||||
$morePages = false;
|
||||
$count = 0;
|
||||
|
||||
$result = (object) [];
|
||||
$result->results = [];
|
||||
|
||||
// some "edge cases" for testing trueSec rounding...
|
||||
//$searchToken = 'H472-N'; // -0.000001 -> 0.0
|
||||
//$searchToken = 'X1E-OQ'; // -0.099426 -> -0.10
|
||||
//$searchToken = 'BKK4-H'; // -0.049954 -> -0.05
|
||||
//$searchToken = 'Uhtafal'; // 0.499612 -> 0.5 (HS)
|
||||
//$searchToken = 'Oshaima'; // 0.453128 -> 0.5 (HS)
|
||||
//$searchToken = 'Ayeroilen'; // 0.446568 -> 0.4 (LS)
|
||||
//$searchToken = 'Enderailen'; // 0.448785 -> 0.4 (LS)
|
||||
//$searchToken = 'Neziel'; // 0.449943 -> 0.4 (LS)
|
||||
//$searchToken = 'Naga'; // 0.033684 -> 0.1 (LS)
|
||||
|
||||
if(strlen($search = (string)$params['id']) >= 3){
|
||||
$page = max((int)$requestData['page'],1);
|
||||
$offset = ($page - 1) * self::PAGE_SIZE_SYSTEMS;
|
||||
$system = Model\Universe\AbstractUniverseModel::getNew('SystemModel');
|
||||
|
||||
$filter = [
|
||||
'id LIKE :id OR name LIKE :name',
|
||||
':id' => $search . '%', // -> match first
|
||||
':name' => '%' . $search . '%' // -> match between
|
||||
];
|
||||
$options = [
|
||||
'order' => 'name',
|
||||
'offset' => $offset,
|
||||
'limit' => self::PAGE_SIZE_SYSTEMS
|
||||
];
|
||||
$count = $system->count($filter);
|
||||
$endCount = $offset + self::PAGE_SIZE_SYSTEMS;
|
||||
$morePages = $endCount < $count;
|
||||
|
||||
/**
|
||||
* @var Model\Universe\SystemModel[] $systems
|
||||
*/
|
||||
$systems = $system->find($filter, $options);
|
||||
if($systems){
|
||||
$allowedKeys = array_flip(self::SYSTEM_DATA_KEYS);
|
||||
foreach($systems as $system){
|
||||
if($systemData = $system->fromIndex()){
|
||||
$result->results[] = (object)array_intersect_key((array)$systemData, $allowedKeys);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$result->pagination = ['more' => $morePages, 'count' => $count];
|
||||
|
||||
$this->out($result);
|
||||
}
|
||||
}
|
||||
@@ -37,71 +37,6 @@ class Universe extends Controller\AccessController {
|
||||
echo json_encode($universeNameData);
|
||||
}
|
||||
|
||||
/**
|
||||
* search systems by name
|
||||
* @param \Base $f3
|
||||
* @param $params
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function systems(\Base $f3, $params){
|
||||
$getData = (array)$f3->get('GET');
|
||||
$page = isset($getData['page']) ? (int)max($getData['page'],1) : 1;
|
||||
$search = isset($params['arg1']) ? (string)$params['arg1'] : '';
|
||||
$morePages = false;
|
||||
$count = 0;
|
||||
// reduce returned system data to required keys (save bandwidth)
|
||||
$allowedProperties = array_flip(['id', 'name', 'trueSec', 'security', 'effect', 'shattered']);
|
||||
|
||||
$return = (object) [];
|
||||
$return->results = [];
|
||||
|
||||
// some "edge cases" for testing trueSec rounding...
|
||||
//$searchToken = 'H472-N'; // -0.000001 -> 0.0
|
||||
//$searchToken = 'X1E-OQ'; // -0.099426 -> -0.10
|
||||
//$searchToken = 'BKK4-H'; // -0.049954 -> -0.05
|
||||
//$searchToken = 'Uhtafal'; // 0.499612 -> 0.5 (HS)
|
||||
//$searchToken = 'Oshaima'; // 0.453128 -> 0.5 (HS)
|
||||
//$searchToken = 'Ayeroilen'; // 0.446568 -> 0.4 (LS)
|
||||
//$searchToken = 'Enderailen'; // 0.448785 -> 0.4 (LS)
|
||||
//$searchToken = 'Neziel'; // 0.449943 -> 0.4 (LS)
|
||||
//$searchToken = 'Naga'; // 0.033684 -> 0.1 (LS)
|
||||
|
||||
if( strlen($search) >= 3 ){
|
||||
$offset = ($page - 1) * self::PAGE_SIZE_SYSTEMS;
|
||||
$system = Model\Universe\AbstractUniverseModel::getNew('SystemModel');
|
||||
|
||||
$filter = [
|
||||
'id LIKE :id OR name LIKE :name',
|
||||
':id' => $search . '%', // -> match first
|
||||
':name' => '%' . $search . '%' // -> match between
|
||||
];
|
||||
$options = [
|
||||
'order' => 'name',
|
||||
'offset' => $offset,
|
||||
'limit' => self::PAGE_SIZE_SYSTEMS
|
||||
];
|
||||
$count = $system->count($filter);
|
||||
$endCount = $offset + self::PAGE_SIZE_SYSTEMS;
|
||||
$morePages = $endCount < $count;
|
||||
|
||||
/**
|
||||
* @var Model\Universe\SystemModel[] $systems
|
||||
*/
|
||||
$systems = $system->find($filter, $options);
|
||||
if($systems){
|
||||
foreach($systems as $system){
|
||||
if($systemData = $system->fromIndex()){
|
||||
$return->results[] = (object)array_intersect_key((array)$systemData, $allowedProperties);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$return->pagination = ['more' => $morePages, 'count' => $count];
|
||||
|
||||
echo json_encode($return);
|
||||
}
|
||||
|
||||
/**
|
||||
* get system data for all systems within a constellation
|
||||
* @param \Base $f3
|
||||
|
||||
@@ -34,7 +34,7 @@ requirejs.config({
|
||||
velocity: 'lib/velocity.min', // v1.5.1 animation engine - http://julian.com/research/velocity
|
||||
velocityUI: 'lib/velocity.ui.min', // v5.2.0 plugin for velocity - http://julian.com/research/velocity/#uiPack
|
||||
slidebars: 'lib/slidebars', // v2.0.2 Slidebars - side menu plugin https://www.adchsm.com/slidebars/
|
||||
jsPlumb: 'lib/jsplumb', // v2.9.3 jsPlumb main map draw plugin http://jsplumb.github.io/jsplumb/home.html
|
||||
jsPlumb: 'lib/jsplumb', // v2.13.1 jsPlumb main map draw plugin http://jsplumb.github.io/jsplumb/home.html
|
||||
farahey: 'lib/farahey', // v1.1.2 jsPlumb "magnetizing" plugin extension - https://github.com/ThomasChan/farahey
|
||||
easyTimer: 'lib/easytimer.min', // v4.0.2 EasyTimer - Timer/Chronometer/Countdown library - http://albert-gonzalez.github.io/easytimer.js
|
||||
customScrollbar: 'lib/jquery.mCustomScrollbar.min', // v3.1.5 Custom scroll bars - http://manos.malihu.gr
|
||||
|
||||
@@ -47,7 +47,6 @@ define([], () => {
|
||||
getStatisticsData: '/api/Statistic/getData', // ajax URL - get statistics data (activity log)
|
||||
// universe API
|
||||
searchUniverseData: '/api/Universe/search', // ajax URL - search universe data by category Ids
|
||||
searchUniverseSystemData: '/api/Universe/systems', // ajax URL - search universe system data by name
|
||||
getConstellationData: '/api/Universe/constellationData', // ajax URL - get system constellation data
|
||||
// GitHub API
|
||||
gitHubReleases: '/api/GitHub/releases' // ajax URL - get release info from GitHub
|
||||
@@ -367,22 +366,13 @@ define([], () => {
|
||||
// map connection types
|
||||
connectionTypes: {
|
||||
abyssal: {
|
||||
cssClass: 'pf-map-connection-abyssal',
|
||||
paintStyle: {
|
||||
dashstyle: '0.5 2' // dotted line
|
||||
}
|
||||
cssClass: 'pf-map-connection-abyssal'
|
||||
},
|
||||
jumpbridge: {
|
||||
cssClass: 'pf-map-connection-jumpbridge',
|
||||
paintStyle: {
|
||||
dashstyle: '4 2 1 2'
|
||||
}
|
||||
cssClass: 'pf-map-connection-jumpbridge'
|
||||
},
|
||||
stargate: {
|
||||
cssClass: 'pf-map-connection-stargate',
|
||||
paintStyle: {
|
||||
dashstyle: '0' // solid line
|
||||
}
|
||||
cssClass: 'pf-map-connection-stargate'
|
||||
},
|
||||
wh_eol: {
|
||||
cssClass: 'pf-map-connection-wh-eol'
|
||||
@@ -398,10 +388,6 @@ define([], () => {
|
||||
},
|
||||
wh_jump_mass_s: {
|
||||
cssClass: 'pf-map-connection-wh-size-s',
|
||||
paintStyle: {
|
||||
dashstyle: '0.5 1',
|
||||
strokeWidth: 3
|
||||
},
|
||||
overlays: [
|
||||
['Label',
|
||||
{
|
||||
@@ -414,9 +400,6 @@ define([], () => {
|
||||
},
|
||||
wh_jump_mass_m: {
|
||||
cssClass: 'pf-map-connection-wh-size-m',
|
||||
paintStyle: {
|
||||
dashstyle: '3 1'
|
||||
},
|
||||
overlays: [
|
||||
['Label',
|
||||
{
|
||||
@@ -441,9 +424,6 @@ define([], () => {
|
||||
},
|
||||
wh_jump_mass_xl: {
|
||||
cssClass: 'pf-map-connection-wh-size-xl',
|
||||
paintStyle: {
|
||||
strokeWidth: 6
|
||||
},
|
||||
overlays: [
|
||||
['Label',
|
||||
{
|
||||
@@ -471,11 +451,11 @@ define([], () => {
|
||||
{
|
||||
id: 'pf-map-connection-arrow-overlay',
|
||||
cssClass: 'pf-map-connection-arrow-overlay',
|
||||
location: 0.5,
|
||||
length: '${arrowlength}',
|
||||
width: 12,
|
||||
length: 15,
|
||||
direction: 1,
|
||||
foldback: 0.8,
|
||||
location: 0.5
|
||||
direction: '${arrowdirection}',
|
||||
foldback: '${arrowfoldback}'
|
||||
}]
|
||||
]
|
||||
},
|
||||
|
||||
@@ -60,27 +60,34 @@ define([
|
||||
|
||||
// map menu options
|
||||
let mapOptions = {
|
||||
mapSnapToGrid : {
|
||||
buttonId: Util.config.menuButtonGridId,
|
||||
description: 'Grid snapping',
|
||||
class: 'mapGridClass'
|
||||
},
|
||||
mapMagnetizer: {
|
||||
buttonId: Util.config.menuButtonMagnetizerId,
|
||||
description: 'Magnetizer',
|
||||
onEnable: Magnetizer.initMagnetizer,
|
||||
onDisable: Magnetizer.destroyMagnetizer
|
||||
},
|
||||
mapSnapToGrid : {
|
||||
buttonId: Util.config.menuButtonGridId,
|
||||
description: 'Grid snapping',
|
||||
class: 'mapGridClass'
|
||||
systemRegion : {
|
||||
buttonId: Util.config.menuButtonRegionId,
|
||||
description: 'Region names',
|
||||
class: 'systemRegionClass',
|
||||
onEnable: MapOverlay.toggleInfoSystemRegion,
|
||||
onDisable: MapOverlay.toggleInfoSystemRegion,
|
||||
},
|
||||
systemCompact : {
|
||||
buttonId: Util.config.menuButtonCompactId,
|
||||
description: 'Compact system layout',
|
||||
class: 'systemCompactClass'
|
||||
},
|
||||
mapSignatureOverlays : {
|
||||
buttonId: Util.config.menuButtonEndpointId,
|
||||
description: 'Endpoint overlay',
|
||||
onEnable: MapOverlay.showInfoSignatureOverlays,
|
||||
onDisable: MapOverlay.hideInfoSignatureOverlays,
|
||||
},
|
||||
mapCompact : {
|
||||
buttonId: Util.config.menuButtonCompactId,
|
||||
description: 'Compact system layout',
|
||||
class: 'mapCompactClass'
|
||||
}
|
||||
};
|
||||
|
||||
@@ -930,7 +937,7 @@ define([
|
||||
connection.setConnector(newConnector);
|
||||
|
||||
// we need to "reapply" the types after "Connector" was changed
|
||||
connection.reapplyTypes();
|
||||
// connection.reapplyTypes();
|
||||
}
|
||||
|
||||
// add endpoint types ---------------------------------------------------------------------------------
|
||||
@@ -1203,7 +1210,7 @@ define([
|
||||
|
||||
// show static overlay actions
|
||||
let mapOverlay = MapOverlayUtil.getMapOverlay(mapContainer, 'info');
|
||||
mapOverlay.updateOverlayIcon('systemRegion', 'show');
|
||||
mapOverlay.updateOverlayIcon('systemPopover', 'show');
|
||||
mapOverlay.updateOverlayIcon('connection', 'show');
|
||||
mapOverlay.updateOverlayIcon('connectionEol', 'show');
|
||||
|
||||
@@ -2889,7 +2896,7 @@ define([
|
||||
}
|
||||
|
||||
// compact/small system layout or not
|
||||
let compactView = mapElement.hasClass(MapUtil.config.mapCompactClass);
|
||||
let compactView = mapElement.hasClass(MapUtil.config.systemCompactClass);
|
||||
|
||||
// get current character log data
|
||||
let characterLogSystemId = Util.getObjVal(Util.getCurrentCharacterData('log'), 'system.id') || 0;
|
||||
|
||||
@@ -80,21 +80,22 @@ define([
|
||||
* get overlay parameters for connection overlay (type 'diamond' or 'arrow')
|
||||
* @param overlayType
|
||||
* @param direction
|
||||
* @param prefix for obj keys -> for parameterized Overlays
|
||||
* @returns {{length: number, foldback: number, direction: number}}
|
||||
*/
|
||||
let getConnectionArrowOverlayParams = (overlayType, direction = 1) => {
|
||||
let getConnectionArrowOverlayParams = (overlayType, direction = 1, prefix = 'arrow') => {
|
||||
switch(overlayType){
|
||||
case 'arrow':
|
||||
return {
|
||||
length: 15,
|
||||
direction: direction,
|
||||
foldback: 0.8
|
||||
[`${prefix}length`]: 15,
|
||||
[`${prefix}direction`]: direction,
|
||||
[`${prefix}foldback`]: 0.8
|
||||
};
|
||||
default: // diamond
|
||||
return {
|
||||
length: 10,
|
||||
direction: 1,
|
||||
foldback: 2
|
||||
[`${prefix}length`]: 10,
|
||||
[`${prefix}direction`]: 1,
|
||||
[`${prefix}foldback`]: 2
|
||||
};
|
||||
}
|
||||
};
|
||||
@@ -109,6 +110,8 @@ define([
|
||||
connectionsData = Util.arrayToObject(connectionsData);
|
||||
|
||||
map.setSuspendDrawing(true);
|
||||
// ... redraw should be suspended (no repaint until function ends)
|
||||
let doNotRepaint = map.isSuspendDrawing();
|
||||
|
||||
map.getAllConnections().forEach(connection => {
|
||||
let connectionId = connection.getParameter('connectionId');
|
||||
@@ -121,6 +124,7 @@ define([
|
||||
let sizeLockedBySignature = false;
|
||||
|
||||
if(connection.scope === 'wh'){
|
||||
/* TODO check if we still need this, commented out after jsPlumb `v2.9.3` → `v2.13.1` upgrade
|
||||
if(!connection.hasType(type)){
|
||||
connection.addType(type);
|
||||
}
|
||||
@@ -128,10 +132,11 @@ define([
|
||||
let overlayArrow = connection.getOverlay(MapOverlayUtil.config.connectionOverlayArrowId);
|
||||
|
||||
// Arrow overlay needs to be cleared() (removed) if 'info_signature' gets removed!
|
||||
// jsPlumb does not handle overlay updates for Arrow overlays... so we need to re-apply the the overlay manually
|
||||
// jsPlumb does not handle overlay updates for Arrow overlays... so we need to re-apply the overlay manually
|
||||
if(overlayArrow.path && !overlayArrow.path.isConnected){
|
||||
connection.canvas.appendChild(overlayArrow.path);
|
||||
}
|
||||
*/
|
||||
|
||||
// since there "could" be multiple sig labels on each endpoint,
|
||||
// there can only one "primary label picked up for wormhole jump mass detection!
|
||||
@@ -187,7 +192,13 @@ define([
|
||||
);
|
||||
}
|
||||
|
||||
overlayArrow.updateFrom(getConnectionArrowOverlayParams(overlayType, arrowDirection));
|
||||
let arrowParams = getConnectionArrowOverlayParams(overlayType, arrowDirection);
|
||||
|
||||
if(!connection.hasType(type)){
|
||||
connection.addType(type, arrowParams, doNotRepaint);
|
||||
}else{
|
||||
connection.reapplyTypes(arrowParams, doNotRepaint);
|
||||
}
|
||||
|
||||
// update/add endpoint overlays -------------------------------------------------------------------
|
||||
updateEndpointOverlaySignatureLabel(sourceEndpoint, signatureTypeData.source);
|
||||
@@ -213,7 +224,7 @@ define([
|
||||
}else{
|
||||
// connection is not 'wh' scope
|
||||
if(connection.hasType(type)){
|
||||
connection.removeType(type);
|
||||
connection.removeType(type, undefined, doNotRepaint);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -312,6 +323,17 @@ define([
|
||||
map.setSuspendDrawing(false, true);
|
||||
};
|
||||
|
||||
/**
|
||||
* callback after applying map option "systemRegion"
|
||||
* -> system dimension changed -> redraw connections
|
||||
* @param mapElement
|
||||
*/
|
||||
let toggleInfoSystemRegion = mapElement => {
|
||||
let mapId = mapElement.data('id');
|
||||
let map = MapUtil.getMapInstance(mapId);
|
||||
map.repaintEverything();
|
||||
};
|
||||
|
||||
/**
|
||||
* Overlay options (all available map options shown in overlay)
|
||||
* "active": (active || hover) indicated whether an icon/option
|
||||
@@ -325,7 +347,7 @@ define([
|
||||
trigger: 'active',
|
||||
class: 'pf-map-overlay-filter',
|
||||
iconClass: ['fas', 'fa-fw', 'fa-filter'],
|
||||
onClick: function(e){
|
||||
onClick: function(e){
|
||||
// clear all filter
|
||||
let mapElement = MapOverlayUtil.getMapElementFromOverlay(this);
|
||||
let map = getMapObjectFromOverlayIcon(this);
|
||||
@@ -335,22 +357,34 @@ define([
|
||||
}
|
||||
},
|
||||
mapSnapToGrid: {
|
||||
title: 'active grid',
|
||||
title: 'grid',
|
||||
trigger: 'active',
|
||||
class: 'pf-map-overlay-grid',
|
||||
iconClass: ['fas', 'fa-fw', 'fa-th']
|
||||
},
|
||||
mapMagnetizer: {
|
||||
title: 'active magnetizer',
|
||||
title: 'magnetizer',
|
||||
trigger: 'active',
|
||||
class: 'pf-map-overlay-magnetizer',
|
||||
iconClass: ['fas', 'fa-fw', 'fa-magnet']
|
||||
},
|
||||
systemRegion: {
|
||||
title: 'show regions',
|
||||
trigger: 'hover',
|
||||
title: 'regions',
|
||||
trigger: 'active',
|
||||
class: 'pf-map-overlay-region',
|
||||
iconClass: ['fas', 'fa-fw', 'fa-tags'],
|
||||
iconClass: ['fas', 'fa-fw', 'fa-map-marked-alt']
|
||||
},
|
||||
systemCompact: {
|
||||
title: 'compact layout',
|
||||
trigger: 'active',
|
||||
class: 'pf-map-overlay-compact',
|
||||
iconClass: ['fas', 'fa-fw', 'fa-compress']
|
||||
},
|
||||
systemPopover: {
|
||||
title: 'sovereignty',
|
||||
trigger: 'hover',
|
||||
class: 'pf-map-overlay-popover',
|
||||
iconClass: ['fas', 'fa-fw', 'fa-landmark'],
|
||||
hoverIntent: {
|
||||
over: function(e){
|
||||
let mapElement = MapOverlayUtil.getMapElementFromOverlay(this);
|
||||
@@ -360,17 +394,17 @@ define([
|
||||
if(!systemHead.data('bs.popover')){
|
||||
let system = systemHead.parent();
|
||||
let systemData = system.data();
|
||||
systemHead.popover({
|
||||
placement: 'bottom',
|
||||
html: true,
|
||||
trigger: 'manual',
|
||||
container: mapElement,
|
||||
title: false,
|
||||
content: Util.getSystemRegionTable(
|
||||
Util.getObjVal(systemData, 'region'),
|
||||
Util.getObjVal(systemData, 'sovereignty')
|
||||
)
|
||||
});
|
||||
let sovereignty = Util.getObjVal(systemData, 'sovereignty');
|
||||
if(sovereignty){
|
||||
systemHead.popover({
|
||||
placement: 'bottom',
|
||||
html: true,
|
||||
trigger: 'manual',
|
||||
container: mapElement,
|
||||
title: false,
|
||||
content: Util.getSystemSovereigntyTable(sovereignty)
|
||||
});
|
||||
}
|
||||
}
|
||||
systemHead.setPopoverSmall();
|
||||
systemHead.popover('show');
|
||||
@@ -383,17 +417,11 @@ define([
|
||||
}
|
||||
},
|
||||
mapSignatureOverlays: {
|
||||
title: 'active signature overlays',
|
||||
title: 'signature overlays',
|
||||
trigger: 'active',
|
||||
class: 'pf-map-overlay-endpoint',
|
||||
iconClass: ['fas', 'fa-fw', 'fa-link']
|
||||
},
|
||||
mapCompact: {
|
||||
title: 'compact layout',
|
||||
trigger: 'active',
|
||||
class: 'pf-map-overlay-compact',
|
||||
iconClass: ['fas', 'fa-fw', 'fa-compress']
|
||||
},
|
||||
connection: {
|
||||
title: 'WH data',
|
||||
trigger: 'hover',
|
||||
@@ -445,7 +473,7 @@ define([
|
||||
}
|
||||
},
|
||||
connectionEol: {
|
||||
title: 'EOL timer',
|
||||
title: 'EOL',
|
||||
trigger: 'hover',
|
||||
class: 'pf-map-overlay-connection-eol',
|
||||
iconClass: ['fas', 'fa-fw', 'fa-hourglass-end'],
|
||||
@@ -861,9 +889,10 @@ define([
|
||||
};
|
||||
|
||||
return {
|
||||
showInfoSignatureOverlays: showInfoSignatureOverlays,
|
||||
hideInfoSignatureOverlays: hideInfoSignatureOverlays,
|
||||
updateZoomOverlay: updateZoomOverlay,
|
||||
initMapDebugOverlays: initMapDebugOverlays
|
||||
showInfoSignatureOverlays,
|
||||
hideInfoSignatureOverlays,
|
||||
toggleInfoSystemRegion,
|
||||
updateZoomOverlay,
|
||||
initMapDebugOverlays
|
||||
};
|
||||
});
|
||||
@@ -22,6 +22,7 @@ define([
|
||||
systemHeadInfoClass: 'pf-system-head-info', // class for system info
|
||||
systemHeadInfoLeftClass: 'pf-system-head-info-left', // class for left system info
|
||||
systemHeadInfoRightClass: 'pf-system-head-info-right', // class for right system info
|
||||
systemHeadRegionClass: 'pf-system-head-region', // class for "region" in system info
|
||||
|
||||
systemTooltipInnerIdPrefix: 'pf-system-tooltip-inner-', // id prefix for system tooltip content
|
||||
systemTooltipInnerClass: 'pf-system-tooltip-inner', // class for system tooltip content
|
||||
@@ -765,19 +766,32 @@ define([
|
||||
* get new dom element for systemData that shows "info" data (additional data)
|
||||
* -> this is show below the system base data on map
|
||||
* @param data
|
||||
* @returns {*}
|
||||
* @returns {HTMLDivElement|undefined}
|
||||
*/
|
||||
let getHeadInfoElement = data => {
|
||||
let headInfo = null;
|
||||
let infoEl;
|
||||
let headInfoLeft = [];
|
||||
let headInfoRight = [];
|
||||
|
||||
if(data.drifter){
|
||||
headInfoLeft.push('<i class="fas fa-fw fa-wave-square ' + Util.getSecurityClassForSystem(data.security) + '" title="drifter"></i>');
|
||||
headInfoLeft.push(Object.assign(document.createElement('i'), {
|
||||
className: `fas fa-fw fa-wave-square ${Util.getSecurityClassForSystem(data.security)}`,
|
||||
title: 'drifter'
|
||||
}));
|
||||
}
|
||||
|
||||
if(data.shattered){
|
||||
headInfoLeft.push('<i class="fas fa-fw fa-chart-pie ' + Util.getSecurityClassForSystem('SH') + '" title="shattered"></i>');
|
||||
headInfoLeft.push(Object.assign(document.createElement('i'), {
|
||||
className: `fas fa-fw fa-chart-pie ${Util.getSecurityClassForSystem('SH')}`,
|
||||
title: 'shattered'
|
||||
}));
|
||||
}
|
||||
|
||||
if(data.type.id === 2){
|
||||
headInfoLeft.push(Object.assign(document.createElement('span'), {
|
||||
className: config.systemHeadRegionClass,
|
||||
textContent: data.region.name
|
||||
}));
|
||||
}
|
||||
|
||||
// check systemData if headInfo element is needed
|
||||
@@ -785,31 +799,36 @@ define([
|
||||
// format wh statics
|
||||
for(let wormholeName of data.statics){
|
||||
let staticData = Object.assign({}, Init.wormholes[wormholeName]);
|
||||
headInfoRight.push(
|
||||
'<span class="' +
|
||||
Util.getSecurityClassForSystem(staticData.security) + ' ' +
|
||||
Util.config.popoverTriggerClass + '" data-name="' + staticData.name +
|
||||
'">' + staticData.security + '</span>'
|
||||
);
|
||||
let staticEl = Object.assign(document.createElement('span'), {
|
||||
className: [
|
||||
Util.getSecurityClassForSystem(staticData.security),
|
||||
Util.config.popoverTriggerClass
|
||||
].join(' '),
|
||||
textContent: staticData.security
|
||||
});
|
||||
staticEl.dataset.name = staticData.name;
|
||||
headInfoRight.push(staticEl);
|
||||
}
|
||||
}
|
||||
|
||||
if(headInfoLeft.length || headInfoRight.length){
|
||||
headInfo = $('<div>', {
|
||||
class: config.systemHeadInfoClass
|
||||
}).append(
|
||||
$('<div>', {
|
||||
class: config.systemHeadInfoLeftClass,
|
||||
html: headInfoLeft.join(' ')
|
||||
}),
|
||||
$('<div>', {
|
||||
class: config.systemHeadInfoRightClass,
|
||||
html: headInfoRight.join(' ')
|
||||
})
|
||||
);
|
||||
let leftEl = Object.assign(document.createElement('div'), {
|
||||
className: config.systemHeadInfoLeftClass
|
||||
});
|
||||
leftEl.append(...headInfoLeft);
|
||||
|
||||
let rightEl = Object.assign(document.createElement('div'), {
|
||||
className: config.systemHeadInfoRightClass
|
||||
});
|
||||
rightEl.append(...headInfoRight);
|
||||
|
||||
infoEl = Object.assign(document.createElement('div'), {
|
||||
className: config.systemHeadInfoClass
|
||||
});
|
||||
infoEl.append(leftEl, rightEl);
|
||||
}
|
||||
|
||||
return headInfo;
|
||||
return infoEl;
|
||||
};
|
||||
|
||||
return {
|
||||
|
||||
@@ -19,7 +19,8 @@ define([
|
||||
zoomMin: 0.5,
|
||||
|
||||
mapGridClass: 'pf-grid-small', // class for map grid snapping
|
||||
mapCompactClass: 'pf-compact', // class for map compact system UI
|
||||
systemRegionClass: 'pf-map-region', // class for systems regions on map
|
||||
systemCompactClass: 'pf-map-compact', // class for compact systems on map
|
||||
|
||||
systemIdPrefix: 'pf-system-', // id prefix for a system
|
||||
systemClass: 'pf-system', // class for all systems
|
||||
@@ -1293,8 +1294,10 @@ define([
|
||||
|
||||
connection._jsPlumb.instance.setSuspendDrawing(true);
|
||||
|
||||
removeConnectionTypes(connection, types.diff(type));
|
||||
addConnectionTypes(connection, type);
|
||||
// ... redraw should be suspended (no repaint until function ends)
|
||||
let doNotRepaint = connection._jsPlumb.instance.isSuspendDrawing();
|
||||
removeConnectionTypes(connection, types.diff(type), [], doNotRepaint);
|
||||
addConnectionTypes(connection, type, [], doNotRepaint);
|
||||
|
||||
connection._jsPlumb.instance.setSuspendDrawing(false, true);
|
||||
};
|
||||
@@ -1443,9 +1446,9 @@ define([
|
||||
payload: mapConfig
|
||||
});
|
||||
|
||||
// init compact system layout ---------------------------------------------------------------------
|
||||
// init grid snap ---------------------------------------------------------------------------------
|
||||
Util.triggerMenuAction(mapElement, 'MapOption', {
|
||||
option: 'mapCompact',
|
||||
option: 'mapSnapToGrid',
|
||||
toggle: false
|
||||
});
|
||||
|
||||
@@ -1455,9 +1458,15 @@ define([
|
||||
toggle: false
|
||||
});
|
||||
|
||||
// init grid snap ---------------------------------------------------------------------------------
|
||||
// init compact system layout ---------------------------------------------------------------------
|
||||
Util.triggerMenuAction(mapElement, 'MapOption', {
|
||||
option: 'mapSnapToGrid',
|
||||
option: 'systemRegion',
|
||||
toggle: false
|
||||
});
|
||||
|
||||
// init compact system layout ---------------------------------------------------------------------
|
||||
Util.triggerMenuAction(mapElement, 'MapOption', {
|
||||
option: 'systemCompact',
|
||||
toggle: false
|
||||
});
|
||||
|
||||
|
||||
@@ -335,15 +335,6 @@ define([
|
||||
let executor = resolve => {
|
||||
$(pageMenuRightEl).append(getMenu([
|
||||
{
|
||||
type: 'button',
|
||||
label: 'Information',
|
||||
icon: 'fa-street-view',
|
||||
action: 'ShowMapInfo',
|
||||
data: {tab: 'information'}
|
||||
},{
|
||||
type: 'heading',
|
||||
label: 'Configuration'
|
||||
},{
|
||||
type: 'button',
|
||||
class: 'loading',
|
||||
label: 'Settings',
|
||||
@@ -351,6 +342,15 @@ define([
|
||||
group: 'mapOptions',
|
||||
action: 'ShowMapSettings',
|
||||
data: {tab: 'settings'}
|
||||
},{
|
||||
type: 'button',
|
||||
label: 'Information',
|
||||
icon: 'fa-street-view',
|
||||
action: 'ShowMapInfo',
|
||||
data: {tab: 'information'}
|
||||
},{
|
||||
type: 'heading',
|
||||
label: 'Map'
|
||||
},{
|
||||
type: 'button',
|
||||
id: Util.config.menuButtonGridId,
|
||||
@@ -371,26 +371,42 @@ define([
|
||||
action: 'MapOption',
|
||||
target: 'map',
|
||||
data: {option: 'mapMagnetizer', toggle: true}
|
||||
},{
|
||||
type: 'heading',
|
||||
label: 'System'
|
||||
},{
|
||||
type: 'button',
|
||||
id: Util.config.menuButtonRegionId,
|
||||
class: 'loading',
|
||||
label: 'Region label',
|
||||
icon: 'fa-map-marked-alt',
|
||||
group: 'mapOptions',
|
||||
action: 'MapOption',
|
||||
target: 'map',
|
||||
data: {option: 'systemRegion', toggle: true}
|
||||
},{
|
||||
type: 'button',
|
||||
id: Util.config.menuButtonCompactId,
|
||||
class: 'loading',
|
||||
label: 'Compact view',
|
||||
icon: 'fa-compress',
|
||||
group: 'mapOptions',
|
||||
action: 'MapOption',
|
||||
target: 'map',
|
||||
data: {option: 'systemCompact', toggle: true}
|
||||
},{
|
||||
type: 'heading',
|
||||
label: 'Connection'
|
||||
},{
|
||||
type: 'button',
|
||||
id: Util.config.menuButtonEndpointId,
|
||||
class: 'loading',
|
||||
label: 'Signatures',
|
||||
label: 'Signature overlay',
|
||||
icon: 'fa-link',
|
||||
group: 'mapOptions',
|
||||
action: 'MapOption',
|
||||
target: 'map',
|
||||
data: {option: 'mapSignatureOverlays', toggle: true}
|
||||
},{
|
||||
type: 'button',
|
||||
id: Util.config.menuButtonCompactId,
|
||||
class: 'loading',
|
||||
label: 'Compact',
|
||||
icon: 'fa-compress',
|
||||
group: 'mapOptions',
|
||||
action: 'MapOption',
|
||||
target: 'map',
|
||||
data: {option: 'mapCompact', toggle: true}
|
||||
},{
|
||||
type: 'heading',
|
||||
label: 'Help'
|
||||
|
||||
@@ -370,19 +370,14 @@ define([
|
||||
$.when(
|
||||
selectElement.select2({
|
||||
ajax: {
|
||||
url: function(params){
|
||||
// add params to URL
|
||||
return Init.path.searchUniverseSystemData + '/' + params.term.trim();
|
||||
},
|
||||
url: params => `${Init.path.api}/SystemSearch/${params.term.trim()}`,
|
||||
dataType: 'json',
|
||||
delay: 250,
|
||||
timeout: 5000,
|
||||
cache: true,
|
||||
data: function(params){
|
||||
return {
|
||||
page: params.page || 1
|
||||
};
|
||||
},
|
||||
data: params => ({
|
||||
page: params.page || 1
|
||||
}),
|
||||
processResults: function(data, params){
|
||||
// parse the results into the format expected by Select2.
|
||||
return {
|
||||
|
||||
@@ -59,8 +59,9 @@ define([
|
||||
menuButtonFullScreenId: 'pf-menu-button-fullscreen', // id for menu button "fullScreen"
|
||||
menuButtonMagnetizerId: 'pf-menu-button-magnetizer', // id for menu button "magnetizer"
|
||||
menuButtonGridId: 'pf-menu-button-grid', // id for menu button "grid snap"
|
||||
menuButtonEndpointId: 'pf-menu-button-endpoint', // id for menu button "endpoint" overlays
|
||||
menuButtonRegionId: 'pf-menu-button-region', // id for menu button "region" info on systems
|
||||
menuButtonCompactId: 'pf-menu-button-compact', // id for menu button "compact" UI map view
|
||||
menuButtonEndpointId: 'pf-menu-button-endpoint', // id for menu button "endpoint" overlays
|
||||
menuButtonMapDeleteId: 'pf-menu-button-map-delete', // id for menu button "delete map"
|
||||
|
||||
// footer
|
||||
@@ -2543,20 +2544,19 @@ define([
|
||||
};
|
||||
|
||||
/**
|
||||
* get a HTML table with universe region information
|
||||
* get a HTML table with universe sovereignty data
|
||||
* e.g. for popover
|
||||
* @param regionName
|
||||
* @param sovereignty
|
||||
* @returns {string}
|
||||
*/
|
||||
let getSystemRegionTable = (regionName, sovereignty) => {
|
||||
let data = [{label: 'Region', value: regionName}];
|
||||
let getSystemSovereigntyTable = sovereignty => {
|
||||
let data = [];
|
||||
if(sovereignty){
|
||||
if(sovereignty.faction){
|
||||
data.push({label: 'Sov. Faction', value: sovereignty.faction.name});
|
||||
data.push({label: 'Faction', value: sovereignty.faction.name});
|
||||
}
|
||||
if(sovereignty.alliance){
|
||||
data.push({label: 'Sov. Ally', value: sovereignty.alliance.name});
|
||||
data.push({label: 'Alliance', value: sovereignty.alliance.name});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3717,7 +3717,7 @@ define([
|
||||
getSystemEffectData: getSystemEffectData,
|
||||
getSystemEffectTable: getSystemEffectTable,
|
||||
getSystemPlanetsTable: getSystemPlanetsTable,
|
||||
getSystemRegionTable: getSystemRegionTable,
|
||||
getSystemSovereigntyTable: getSystemSovereigntyTable,
|
||||
getSystemPilotsTable: getSystemPilotsTable,
|
||||
getSystemsInfoTable: getSystemsInfoTable,
|
||||
getStatusInfoForCharacter: getStatusInfoForCharacter,
|
||||
|
||||
1744
js/lib/jsplumb.js
1744
js/lib/jsplumb.js
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -34,7 +34,7 @@ requirejs.config({
|
||||
velocity: 'lib/velocity.min', // v1.5.1 animation engine - http://julian.com/research/velocity
|
||||
velocityUI: 'lib/velocity.ui.min', // v5.2.0 plugin for velocity - http://julian.com/research/velocity/#uiPack
|
||||
slidebars: 'lib/slidebars', // v2.0.2 Slidebars - side menu plugin https://www.adchsm.com/slidebars/
|
||||
jsPlumb: 'lib/jsplumb', // v2.9.3 jsPlumb main map draw plugin http://jsplumb.github.io/jsplumb/home.html
|
||||
jsPlumb: 'lib/jsplumb', // v2.13.1 jsPlumb main map draw plugin http://jsplumb.github.io/jsplumb/home.html
|
||||
farahey: 'lib/farahey', // v1.1.2 jsPlumb "magnetizing" plugin extension - https://github.com/ThomasChan/farahey
|
||||
easyTimer: 'lib/easytimer.min', // v4.0.2 EasyTimer - Timer/Chronometer/Countdown library - http://albert-gonzalez.github.io/easytimer.js
|
||||
customScrollbar: 'lib/jquery.mCustomScrollbar.min', // v3.1.5 Custom scroll bars - http://manos.malihu.gr
|
||||
|
||||
@@ -47,7 +47,6 @@ define([], () => {
|
||||
getStatisticsData: '/api/Statistic/getData', // ajax URL - get statistics data (activity log)
|
||||
// universe API
|
||||
searchUniverseData: '/api/Universe/search', // ajax URL - search universe data by category Ids
|
||||
searchUniverseSystemData: '/api/Universe/systems', // ajax URL - search universe system data by name
|
||||
getConstellationData: '/api/Universe/constellationData', // ajax URL - get system constellation data
|
||||
// GitHub API
|
||||
gitHubReleases: '/api/GitHub/releases' // ajax URL - get release info from GitHub
|
||||
@@ -367,22 +366,13 @@ define([], () => {
|
||||
// map connection types
|
||||
connectionTypes: {
|
||||
abyssal: {
|
||||
cssClass: 'pf-map-connection-abyssal',
|
||||
paintStyle: {
|
||||
dashstyle: '0.5 2' // dotted line
|
||||
}
|
||||
cssClass: 'pf-map-connection-abyssal'
|
||||
},
|
||||
jumpbridge: {
|
||||
cssClass: 'pf-map-connection-jumpbridge',
|
||||
paintStyle: {
|
||||
dashstyle: '4 2 1 2'
|
||||
}
|
||||
cssClass: 'pf-map-connection-jumpbridge'
|
||||
},
|
||||
stargate: {
|
||||
cssClass: 'pf-map-connection-stargate',
|
||||
paintStyle: {
|
||||
dashstyle: '0' // solid line
|
||||
}
|
||||
cssClass: 'pf-map-connection-stargate'
|
||||
},
|
||||
wh_eol: {
|
||||
cssClass: 'pf-map-connection-wh-eol'
|
||||
@@ -398,10 +388,6 @@ define([], () => {
|
||||
},
|
||||
wh_jump_mass_s: {
|
||||
cssClass: 'pf-map-connection-wh-size-s',
|
||||
paintStyle: {
|
||||
dashstyle: '0.5 1',
|
||||
strokeWidth: 3
|
||||
},
|
||||
overlays: [
|
||||
['Label',
|
||||
{
|
||||
@@ -414,9 +400,6 @@ define([], () => {
|
||||
},
|
||||
wh_jump_mass_m: {
|
||||
cssClass: 'pf-map-connection-wh-size-m',
|
||||
paintStyle: {
|
||||
dashstyle: '3 1'
|
||||
},
|
||||
overlays: [
|
||||
['Label',
|
||||
{
|
||||
@@ -441,9 +424,6 @@ define([], () => {
|
||||
},
|
||||
wh_jump_mass_xl: {
|
||||
cssClass: 'pf-map-connection-wh-size-xl',
|
||||
paintStyle: {
|
||||
strokeWidth: 6
|
||||
},
|
||||
overlays: [
|
||||
['Label',
|
||||
{
|
||||
@@ -471,11 +451,11 @@ define([], () => {
|
||||
{
|
||||
id: 'pf-map-connection-arrow-overlay',
|
||||
cssClass: 'pf-map-connection-arrow-overlay',
|
||||
location: 0.5,
|
||||
length: '${arrowlength}',
|
||||
width: 12,
|
||||
length: 15,
|
||||
direction: 1,
|
||||
foldback: 0.8,
|
||||
location: 0.5
|
||||
direction: '${arrowdirection}',
|
||||
foldback: '${arrowfoldback}'
|
||||
}]
|
||||
]
|
||||
},
|
||||
|
||||
@@ -60,27 +60,34 @@ define([
|
||||
|
||||
// map menu options
|
||||
let mapOptions = {
|
||||
mapSnapToGrid : {
|
||||
buttonId: Util.config.menuButtonGridId,
|
||||
description: 'Grid snapping',
|
||||
class: 'mapGridClass'
|
||||
},
|
||||
mapMagnetizer: {
|
||||
buttonId: Util.config.menuButtonMagnetizerId,
|
||||
description: 'Magnetizer',
|
||||
onEnable: Magnetizer.initMagnetizer,
|
||||
onDisable: Magnetizer.destroyMagnetizer
|
||||
},
|
||||
mapSnapToGrid : {
|
||||
buttonId: Util.config.menuButtonGridId,
|
||||
description: 'Grid snapping',
|
||||
class: 'mapGridClass'
|
||||
systemRegion : {
|
||||
buttonId: Util.config.menuButtonRegionId,
|
||||
description: 'Region names',
|
||||
class: 'systemRegionClass',
|
||||
onEnable: MapOverlay.toggleInfoSystemRegion,
|
||||
onDisable: MapOverlay.toggleInfoSystemRegion,
|
||||
},
|
||||
systemCompact : {
|
||||
buttonId: Util.config.menuButtonCompactId,
|
||||
description: 'Compact system layout',
|
||||
class: 'systemCompactClass'
|
||||
},
|
||||
mapSignatureOverlays : {
|
||||
buttonId: Util.config.menuButtonEndpointId,
|
||||
description: 'Endpoint overlay',
|
||||
onEnable: MapOverlay.showInfoSignatureOverlays,
|
||||
onDisable: MapOverlay.hideInfoSignatureOverlays,
|
||||
},
|
||||
mapCompact : {
|
||||
buttonId: Util.config.menuButtonCompactId,
|
||||
description: 'Compact system layout',
|
||||
class: 'mapCompactClass'
|
||||
}
|
||||
};
|
||||
|
||||
@@ -930,7 +937,7 @@ define([
|
||||
connection.setConnector(newConnector);
|
||||
|
||||
// we need to "reapply" the types after "Connector" was changed
|
||||
connection.reapplyTypes();
|
||||
// connection.reapplyTypes();
|
||||
}
|
||||
|
||||
// add endpoint types ---------------------------------------------------------------------------------
|
||||
@@ -1203,7 +1210,7 @@ define([
|
||||
|
||||
// show static overlay actions
|
||||
let mapOverlay = MapOverlayUtil.getMapOverlay(mapContainer, 'info');
|
||||
mapOverlay.updateOverlayIcon('systemRegion', 'show');
|
||||
mapOverlay.updateOverlayIcon('systemPopover', 'show');
|
||||
mapOverlay.updateOverlayIcon('connection', 'show');
|
||||
mapOverlay.updateOverlayIcon('connectionEol', 'show');
|
||||
|
||||
@@ -2889,7 +2896,7 @@ define([
|
||||
}
|
||||
|
||||
// compact/small system layout or not
|
||||
let compactView = mapElement.hasClass(MapUtil.config.mapCompactClass);
|
||||
let compactView = mapElement.hasClass(MapUtil.config.systemCompactClass);
|
||||
|
||||
// get current character log data
|
||||
let characterLogSystemId = Util.getObjVal(Util.getCurrentCharacterData('log'), 'system.id') || 0;
|
||||
|
||||
@@ -80,21 +80,22 @@ define([
|
||||
* get overlay parameters for connection overlay (type 'diamond' or 'arrow')
|
||||
* @param overlayType
|
||||
* @param direction
|
||||
* @param prefix for obj keys -> for parameterized Overlays
|
||||
* @returns {{length: number, foldback: number, direction: number}}
|
||||
*/
|
||||
let getConnectionArrowOverlayParams = (overlayType, direction = 1) => {
|
||||
let getConnectionArrowOverlayParams = (overlayType, direction = 1, prefix = 'arrow') => {
|
||||
switch(overlayType){
|
||||
case 'arrow':
|
||||
return {
|
||||
length: 15,
|
||||
direction: direction,
|
||||
foldback: 0.8
|
||||
[`${prefix}length`]: 15,
|
||||
[`${prefix}direction`]: direction,
|
||||
[`${prefix}foldback`]: 0.8
|
||||
};
|
||||
default: // diamond
|
||||
return {
|
||||
length: 10,
|
||||
direction: 1,
|
||||
foldback: 2
|
||||
[`${prefix}length`]: 10,
|
||||
[`${prefix}direction`]: 1,
|
||||
[`${prefix}foldback`]: 2
|
||||
};
|
||||
}
|
||||
};
|
||||
@@ -109,6 +110,8 @@ define([
|
||||
connectionsData = Util.arrayToObject(connectionsData);
|
||||
|
||||
map.setSuspendDrawing(true);
|
||||
// ... redraw should be suspended (no repaint until function ends)
|
||||
let doNotRepaint = map.isSuspendDrawing();
|
||||
|
||||
map.getAllConnections().forEach(connection => {
|
||||
let connectionId = connection.getParameter('connectionId');
|
||||
@@ -121,6 +124,7 @@ define([
|
||||
let sizeLockedBySignature = false;
|
||||
|
||||
if(connection.scope === 'wh'){
|
||||
/* TODO check if we still need this, commented out after jsPlumb `v2.9.3` → `v2.13.1` upgrade
|
||||
if(!connection.hasType(type)){
|
||||
connection.addType(type);
|
||||
}
|
||||
@@ -128,10 +132,11 @@ define([
|
||||
let overlayArrow = connection.getOverlay(MapOverlayUtil.config.connectionOverlayArrowId);
|
||||
|
||||
// Arrow overlay needs to be cleared() (removed) if 'info_signature' gets removed!
|
||||
// jsPlumb does not handle overlay updates for Arrow overlays... so we need to re-apply the the overlay manually
|
||||
// jsPlumb does not handle overlay updates for Arrow overlays... so we need to re-apply the overlay manually
|
||||
if(overlayArrow.path && !overlayArrow.path.isConnected){
|
||||
connection.canvas.appendChild(overlayArrow.path);
|
||||
}
|
||||
*/
|
||||
|
||||
// since there "could" be multiple sig labels on each endpoint,
|
||||
// there can only one "primary label picked up for wormhole jump mass detection!
|
||||
@@ -187,7 +192,13 @@ define([
|
||||
);
|
||||
}
|
||||
|
||||
overlayArrow.updateFrom(getConnectionArrowOverlayParams(overlayType, arrowDirection));
|
||||
let arrowParams = getConnectionArrowOverlayParams(overlayType, arrowDirection);
|
||||
|
||||
if(!connection.hasType(type)){
|
||||
connection.addType(type, arrowParams, doNotRepaint);
|
||||
}else{
|
||||
connection.reapplyTypes(arrowParams, doNotRepaint);
|
||||
}
|
||||
|
||||
// update/add endpoint overlays -------------------------------------------------------------------
|
||||
updateEndpointOverlaySignatureLabel(sourceEndpoint, signatureTypeData.source);
|
||||
@@ -213,7 +224,7 @@ define([
|
||||
}else{
|
||||
// connection is not 'wh' scope
|
||||
if(connection.hasType(type)){
|
||||
connection.removeType(type);
|
||||
connection.removeType(type, undefined, doNotRepaint);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -312,6 +323,17 @@ define([
|
||||
map.setSuspendDrawing(false, true);
|
||||
};
|
||||
|
||||
/**
|
||||
* callback after applying map option "systemRegion"
|
||||
* -> system dimension changed -> redraw connections
|
||||
* @param mapElement
|
||||
*/
|
||||
let toggleInfoSystemRegion = mapElement => {
|
||||
let mapId = mapElement.data('id');
|
||||
let map = MapUtil.getMapInstance(mapId);
|
||||
map.repaintEverything();
|
||||
};
|
||||
|
||||
/**
|
||||
* Overlay options (all available map options shown in overlay)
|
||||
* "active": (active || hover) indicated whether an icon/option
|
||||
@@ -325,7 +347,7 @@ define([
|
||||
trigger: 'active',
|
||||
class: 'pf-map-overlay-filter',
|
||||
iconClass: ['fas', 'fa-fw', 'fa-filter'],
|
||||
onClick: function(e){
|
||||
onClick: function(e){
|
||||
// clear all filter
|
||||
let mapElement = MapOverlayUtil.getMapElementFromOverlay(this);
|
||||
let map = getMapObjectFromOverlayIcon(this);
|
||||
@@ -335,22 +357,34 @@ define([
|
||||
}
|
||||
},
|
||||
mapSnapToGrid: {
|
||||
title: 'active grid',
|
||||
title: 'grid',
|
||||
trigger: 'active',
|
||||
class: 'pf-map-overlay-grid',
|
||||
iconClass: ['fas', 'fa-fw', 'fa-th']
|
||||
},
|
||||
mapMagnetizer: {
|
||||
title: 'active magnetizer',
|
||||
title: 'magnetizer',
|
||||
trigger: 'active',
|
||||
class: 'pf-map-overlay-magnetizer',
|
||||
iconClass: ['fas', 'fa-fw', 'fa-magnet']
|
||||
},
|
||||
systemRegion: {
|
||||
title: 'show regions',
|
||||
trigger: 'hover',
|
||||
title: 'regions',
|
||||
trigger: 'active',
|
||||
class: 'pf-map-overlay-region',
|
||||
iconClass: ['fas', 'fa-fw', 'fa-tags'],
|
||||
iconClass: ['fas', 'fa-fw', 'fa-map-marked-alt']
|
||||
},
|
||||
systemCompact: {
|
||||
title: 'compact layout',
|
||||
trigger: 'active',
|
||||
class: 'pf-map-overlay-compact',
|
||||
iconClass: ['fas', 'fa-fw', 'fa-compress']
|
||||
},
|
||||
systemPopover: {
|
||||
title: 'sovereignty',
|
||||
trigger: 'hover',
|
||||
class: 'pf-map-overlay-popover',
|
||||
iconClass: ['fas', 'fa-fw', 'fa-landmark'],
|
||||
hoverIntent: {
|
||||
over: function(e){
|
||||
let mapElement = MapOverlayUtil.getMapElementFromOverlay(this);
|
||||
@@ -360,17 +394,17 @@ define([
|
||||
if(!systemHead.data('bs.popover')){
|
||||
let system = systemHead.parent();
|
||||
let systemData = system.data();
|
||||
systemHead.popover({
|
||||
placement: 'bottom',
|
||||
html: true,
|
||||
trigger: 'manual',
|
||||
container: mapElement,
|
||||
title: false,
|
||||
content: Util.getSystemRegionTable(
|
||||
Util.getObjVal(systemData, 'region'),
|
||||
Util.getObjVal(systemData, 'sovereignty')
|
||||
)
|
||||
});
|
||||
let sovereignty = Util.getObjVal(systemData, 'sovereignty');
|
||||
if(sovereignty){
|
||||
systemHead.popover({
|
||||
placement: 'bottom',
|
||||
html: true,
|
||||
trigger: 'manual',
|
||||
container: mapElement,
|
||||
title: false,
|
||||
content: Util.getSystemSovereigntyTable(sovereignty)
|
||||
});
|
||||
}
|
||||
}
|
||||
systemHead.setPopoverSmall();
|
||||
systemHead.popover('show');
|
||||
@@ -383,17 +417,11 @@ define([
|
||||
}
|
||||
},
|
||||
mapSignatureOverlays: {
|
||||
title: 'active signature overlays',
|
||||
title: 'signature overlays',
|
||||
trigger: 'active',
|
||||
class: 'pf-map-overlay-endpoint',
|
||||
iconClass: ['fas', 'fa-fw', 'fa-link']
|
||||
},
|
||||
mapCompact: {
|
||||
title: 'compact layout',
|
||||
trigger: 'active',
|
||||
class: 'pf-map-overlay-compact',
|
||||
iconClass: ['fas', 'fa-fw', 'fa-compress']
|
||||
},
|
||||
connection: {
|
||||
title: 'WH data',
|
||||
trigger: 'hover',
|
||||
@@ -445,7 +473,7 @@ define([
|
||||
}
|
||||
},
|
||||
connectionEol: {
|
||||
title: 'EOL timer',
|
||||
title: 'EOL',
|
||||
trigger: 'hover',
|
||||
class: 'pf-map-overlay-connection-eol',
|
||||
iconClass: ['fas', 'fa-fw', 'fa-hourglass-end'],
|
||||
@@ -861,9 +889,10 @@ define([
|
||||
};
|
||||
|
||||
return {
|
||||
showInfoSignatureOverlays: showInfoSignatureOverlays,
|
||||
hideInfoSignatureOverlays: hideInfoSignatureOverlays,
|
||||
updateZoomOverlay: updateZoomOverlay,
|
||||
initMapDebugOverlays: initMapDebugOverlays
|
||||
showInfoSignatureOverlays,
|
||||
hideInfoSignatureOverlays,
|
||||
toggleInfoSystemRegion,
|
||||
updateZoomOverlay,
|
||||
initMapDebugOverlays
|
||||
};
|
||||
});
|
||||
@@ -22,6 +22,7 @@ define([
|
||||
systemHeadInfoClass: 'pf-system-head-info', // class for system info
|
||||
systemHeadInfoLeftClass: 'pf-system-head-info-left', // class for left system info
|
||||
systemHeadInfoRightClass: 'pf-system-head-info-right', // class for right system info
|
||||
systemHeadRegionClass: 'pf-system-head-region', // class for "region" in system info
|
||||
|
||||
systemTooltipInnerIdPrefix: 'pf-system-tooltip-inner-', // id prefix for system tooltip content
|
||||
systemTooltipInnerClass: 'pf-system-tooltip-inner', // class for system tooltip content
|
||||
@@ -765,19 +766,32 @@ define([
|
||||
* get new dom element for systemData that shows "info" data (additional data)
|
||||
* -> this is show below the system base data on map
|
||||
* @param data
|
||||
* @returns {*}
|
||||
* @returns {HTMLDivElement|undefined}
|
||||
*/
|
||||
let getHeadInfoElement = data => {
|
||||
let headInfo = null;
|
||||
let infoEl;
|
||||
let headInfoLeft = [];
|
||||
let headInfoRight = [];
|
||||
|
||||
if(data.drifter){
|
||||
headInfoLeft.push('<i class="fas fa-fw fa-wave-square ' + Util.getSecurityClassForSystem(data.security) + '" title="drifter"></i>');
|
||||
headInfoLeft.push(Object.assign(document.createElement('i'), {
|
||||
className: `fas fa-fw fa-wave-square ${Util.getSecurityClassForSystem(data.security)}`,
|
||||
title: 'drifter'
|
||||
}));
|
||||
}
|
||||
|
||||
if(data.shattered){
|
||||
headInfoLeft.push('<i class="fas fa-fw fa-chart-pie ' + Util.getSecurityClassForSystem('SH') + '" title="shattered"></i>');
|
||||
headInfoLeft.push(Object.assign(document.createElement('i'), {
|
||||
className: `fas fa-fw fa-chart-pie ${Util.getSecurityClassForSystem('SH')}`,
|
||||
title: 'shattered'
|
||||
}));
|
||||
}
|
||||
|
||||
if(data.type.id === 2){
|
||||
headInfoLeft.push(Object.assign(document.createElement('span'), {
|
||||
className: config.systemHeadRegionClass,
|
||||
textContent: data.region.name
|
||||
}));
|
||||
}
|
||||
|
||||
// check systemData if headInfo element is needed
|
||||
@@ -785,31 +799,36 @@ define([
|
||||
// format wh statics
|
||||
for(let wormholeName of data.statics){
|
||||
let staticData = Object.assign({}, Init.wormholes[wormholeName]);
|
||||
headInfoRight.push(
|
||||
'<span class="' +
|
||||
Util.getSecurityClassForSystem(staticData.security) + ' ' +
|
||||
Util.config.popoverTriggerClass + '" data-name="' + staticData.name +
|
||||
'">' + staticData.security + '</span>'
|
||||
);
|
||||
let staticEl = Object.assign(document.createElement('span'), {
|
||||
className: [
|
||||
Util.getSecurityClassForSystem(staticData.security),
|
||||
Util.config.popoverTriggerClass
|
||||
].join(' '),
|
||||
textContent: staticData.security
|
||||
});
|
||||
staticEl.dataset.name = staticData.name;
|
||||
headInfoRight.push(staticEl);
|
||||
}
|
||||
}
|
||||
|
||||
if(headInfoLeft.length || headInfoRight.length){
|
||||
headInfo = $('<div>', {
|
||||
class: config.systemHeadInfoClass
|
||||
}).append(
|
||||
$('<div>', {
|
||||
class: config.systemHeadInfoLeftClass,
|
||||
html: headInfoLeft.join(' ')
|
||||
}),
|
||||
$('<div>', {
|
||||
class: config.systemHeadInfoRightClass,
|
||||
html: headInfoRight.join(' ')
|
||||
})
|
||||
);
|
||||
let leftEl = Object.assign(document.createElement('div'), {
|
||||
className: config.systemHeadInfoLeftClass
|
||||
});
|
||||
leftEl.append(...headInfoLeft);
|
||||
|
||||
let rightEl = Object.assign(document.createElement('div'), {
|
||||
className: config.systemHeadInfoRightClass
|
||||
});
|
||||
rightEl.append(...headInfoRight);
|
||||
|
||||
infoEl = Object.assign(document.createElement('div'), {
|
||||
className: config.systemHeadInfoClass
|
||||
});
|
||||
infoEl.append(leftEl, rightEl);
|
||||
}
|
||||
|
||||
return headInfo;
|
||||
return infoEl;
|
||||
};
|
||||
|
||||
return {
|
||||
|
||||
@@ -19,7 +19,8 @@ define([
|
||||
zoomMin: 0.5,
|
||||
|
||||
mapGridClass: 'pf-grid-small', // class for map grid snapping
|
||||
mapCompactClass: 'pf-compact', // class for map compact system UI
|
||||
systemRegionClass: 'pf-map-region', // class for systems regions on map
|
||||
systemCompactClass: 'pf-map-compact', // class for compact systems on map
|
||||
|
||||
systemIdPrefix: 'pf-system-', // id prefix for a system
|
||||
systemClass: 'pf-system', // class for all systems
|
||||
@@ -1293,8 +1294,10 @@ define([
|
||||
|
||||
connection._jsPlumb.instance.setSuspendDrawing(true);
|
||||
|
||||
removeConnectionTypes(connection, types.diff(type));
|
||||
addConnectionTypes(connection, type);
|
||||
// ... redraw should be suspended (no repaint until function ends)
|
||||
let doNotRepaint = connection._jsPlumb.instance.isSuspendDrawing();
|
||||
removeConnectionTypes(connection, types.diff(type), [], doNotRepaint);
|
||||
addConnectionTypes(connection, type, [], doNotRepaint);
|
||||
|
||||
connection._jsPlumb.instance.setSuspendDrawing(false, true);
|
||||
};
|
||||
@@ -1443,9 +1446,9 @@ define([
|
||||
payload: mapConfig
|
||||
});
|
||||
|
||||
// init compact system layout ---------------------------------------------------------------------
|
||||
// init grid snap ---------------------------------------------------------------------------------
|
||||
Util.triggerMenuAction(mapElement, 'MapOption', {
|
||||
option: 'mapCompact',
|
||||
option: 'mapSnapToGrid',
|
||||
toggle: false
|
||||
});
|
||||
|
||||
@@ -1455,9 +1458,15 @@ define([
|
||||
toggle: false
|
||||
});
|
||||
|
||||
// init grid snap ---------------------------------------------------------------------------------
|
||||
// init compact system layout ---------------------------------------------------------------------
|
||||
Util.triggerMenuAction(mapElement, 'MapOption', {
|
||||
option: 'mapSnapToGrid',
|
||||
option: 'systemRegion',
|
||||
toggle: false
|
||||
});
|
||||
|
||||
// init compact system layout ---------------------------------------------------------------------
|
||||
Util.triggerMenuAction(mapElement, 'MapOption', {
|
||||
option: 'systemCompact',
|
||||
toggle: false
|
||||
});
|
||||
|
||||
|
||||
@@ -335,15 +335,6 @@ define([
|
||||
let executor = resolve => {
|
||||
$(pageMenuRightEl).append(getMenu([
|
||||
{
|
||||
type: 'button',
|
||||
label: 'Information',
|
||||
icon: 'fa-street-view',
|
||||
action: 'ShowMapInfo',
|
||||
data: {tab: 'information'}
|
||||
},{
|
||||
type: 'heading',
|
||||
label: 'Configuration'
|
||||
},{
|
||||
type: 'button',
|
||||
class: 'loading',
|
||||
label: 'Settings',
|
||||
@@ -351,6 +342,15 @@ define([
|
||||
group: 'mapOptions',
|
||||
action: 'ShowMapSettings',
|
||||
data: {tab: 'settings'}
|
||||
},{
|
||||
type: 'button',
|
||||
label: 'Information',
|
||||
icon: 'fa-street-view',
|
||||
action: 'ShowMapInfo',
|
||||
data: {tab: 'information'}
|
||||
},{
|
||||
type: 'heading',
|
||||
label: 'Map'
|
||||
},{
|
||||
type: 'button',
|
||||
id: Util.config.menuButtonGridId,
|
||||
@@ -371,26 +371,42 @@ define([
|
||||
action: 'MapOption',
|
||||
target: 'map',
|
||||
data: {option: 'mapMagnetizer', toggle: true}
|
||||
},{
|
||||
type: 'heading',
|
||||
label: 'System'
|
||||
},{
|
||||
type: 'button',
|
||||
id: Util.config.menuButtonRegionId,
|
||||
class: 'loading',
|
||||
label: 'Region label',
|
||||
icon: 'fa-map-marked-alt',
|
||||
group: 'mapOptions',
|
||||
action: 'MapOption',
|
||||
target: 'map',
|
||||
data: {option: 'systemRegion', toggle: true}
|
||||
},{
|
||||
type: 'button',
|
||||
id: Util.config.menuButtonCompactId,
|
||||
class: 'loading',
|
||||
label: 'Compact view',
|
||||
icon: 'fa-compress',
|
||||
group: 'mapOptions',
|
||||
action: 'MapOption',
|
||||
target: 'map',
|
||||
data: {option: 'systemCompact', toggle: true}
|
||||
},{
|
||||
type: 'heading',
|
||||
label: 'Connection'
|
||||
},{
|
||||
type: 'button',
|
||||
id: Util.config.menuButtonEndpointId,
|
||||
class: 'loading',
|
||||
label: 'Signatures',
|
||||
label: 'Signature overlay',
|
||||
icon: 'fa-link',
|
||||
group: 'mapOptions',
|
||||
action: 'MapOption',
|
||||
target: 'map',
|
||||
data: {option: 'mapSignatureOverlays', toggle: true}
|
||||
},{
|
||||
type: 'button',
|
||||
id: Util.config.menuButtonCompactId,
|
||||
class: 'loading',
|
||||
label: 'Compact',
|
||||
icon: 'fa-compress',
|
||||
group: 'mapOptions',
|
||||
action: 'MapOption',
|
||||
target: 'map',
|
||||
data: {option: 'mapCompact', toggle: true}
|
||||
},{
|
||||
type: 'heading',
|
||||
label: 'Help'
|
||||
|
||||
@@ -370,19 +370,14 @@ define([
|
||||
$.when(
|
||||
selectElement.select2({
|
||||
ajax: {
|
||||
url: function(params){
|
||||
// add params to URL
|
||||
return Init.path.searchUniverseSystemData + '/' + params.term.trim();
|
||||
},
|
||||
url: params => `${Init.path.api}/SystemSearch/${params.term.trim()}`,
|
||||
dataType: 'json',
|
||||
delay: 250,
|
||||
timeout: 5000,
|
||||
cache: true,
|
||||
data: function(params){
|
||||
return {
|
||||
page: params.page || 1
|
||||
};
|
||||
},
|
||||
data: params => ({
|
||||
page: params.page || 1
|
||||
}),
|
||||
processResults: function(data, params){
|
||||
// parse the results into the format expected by Select2.
|
||||
return {
|
||||
|
||||
@@ -59,8 +59,9 @@ define([
|
||||
menuButtonFullScreenId: 'pf-menu-button-fullscreen', // id for menu button "fullScreen"
|
||||
menuButtonMagnetizerId: 'pf-menu-button-magnetizer', // id for menu button "magnetizer"
|
||||
menuButtonGridId: 'pf-menu-button-grid', // id for menu button "grid snap"
|
||||
menuButtonEndpointId: 'pf-menu-button-endpoint', // id for menu button "endpoint" overlays
|
||||
menuButtonRegionId: 'pf-menu-button-region', // id for menu button "region" info on systems
|
||||
menuButtonCompactId: 'pf-menu-button-compact', // id for menu button "compact" UI map view
|
||||
menuButtonEndpointId: 'pf-menu-button-endpoint', // id for menu button "endpoint" overlays
|
||||
menuButtonMapDeleteId: 'pf-menu-button-map-delete', // id for menu button "delete map"
|
||||
|
||||
// footer
|
||||
@@ -2543,20 +2544,19 @@ define([
|
||||
};
|
||||
|
||||
/**
|
||||
* get a HTML table with universe region information
|
||||
* get a HTML table with universe sovereignty data
|
||||
* e.g. for popover
|
||||
* @param regionName
|
||||
* @param sovereignty
|
||||
* @returns {string}
|
||||
*/
|
||||
let getSystemRegionTable = (regionName, sovereignty) => {
|
||||
let data = [{label: 'Region', value: regionName}];
|
||||
let getSystemSovereigntyTable = sovereignty => {
|
||||
let data = [];
|
||||
if(sovereignty){
|
||||
if(sovereignty.faction){
|
||||
data.push({label: 'Sov. Faction', value: sovereignty.faction.name});
|
||||
data.push({label: 'Faction', value: sovereignty.faction.name});
|
||||
}
|
||||
if(sovereignty.alliance){
|
||||
data.push({label: 'Sov. Ally', value: sovereignty.alliance.name});
|
||||
data.push({label: 'Alliance', value: sovereignty.alliance.name});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3717,7 +3717,7 @@ define([
|
||||
getSystemEffectData: getSystemEffectData,
|
||||
getSystemEffectTable: getSystemEffectTable,
|
||||
getSystemPlanetsTable: getSystemPlanetsTable,
|
||||
getSystemRegionTable: getSystemRegionTable,
|
||||
getSystemSovereigntyTable: getSystemSovereigntyTable,
|
||||
getSystemPilotsTable: getSystemPilotsTable,
|
||||
getSystemsInfoTable: getSystemsInfoTable,
|
||||
getStatusInfoForCharacter: getStatusInfoForCharacter,
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -170,27 +170,27 @@ $btn-border-radius-base: 2px;
|
||||
|
||||
$btn-default-color: $gray-lightest;
|
||||
$btn-default-bg: $gray-light;
|
||||
$btn-default-border: darken($gray-light, 5%);
|
||||
$btn-default-border: lighten($gray-light, 2%);
|
||||
|
||||
$btn-primary-color: $gray-lightest;
|
||||
$btn-primary-bg: $brand-primary;
|
||||
$btn-primary-border: darken($btn-primary-bg, 2%);
|
||||
$btn-primary-border: lighten($btn-primary-bg, 2%);
|
||||
|
||||
$btn-success-color: $gray-lightest;
|
||||
$btn-success-bg: $brand-success;
|
||||
$btn-success-border: darken($btn-success-bg, 5%);
|
||||
$btn-success-border: lighten($btn-success-bg, 2%);
|
||||
|
||||
$btn-info-color: $gray-lightest;
|
||||
$btn-info-bg: $brand-info;
|
||||
$btn-info-border: darken($btn-info-bg, 5%);
|
||||
$btn-info-border: lighten($btn-info-bg, 2%);
|
||||
|
||||
$btn-warning-color: $gray-lightest;
|
||||
$btn-warning-bg: $orange-dark;
|
||||
$btn-warning-border: darken($btn-warning-bg, 5%);
|
||||
$btn-warning-border: lighten($btn-warning-bg, 2%);
|
||||
|
||||
$btn-danger-color: $gray-lightest;
|
||||
$btn-danger-bg: $brand-danger;
|
||||
$btn-danger-border: darken($btn-danger-bg, 5%);
|
||||
$btn-danger-border: lighten($btn-danger-bg, 2%);
|
||||
|
||||
$btn-link-disabled-color: $gray-light;
|
||||
|
||||
|
||||
@@ -509,12 +509,12 @@
|
||||
&.active:not(.toggle-on):not(.toggle-off) {
|
||||
color: $color;
|
||||
background-color: lighten($background, 6%);
|
||||
border-color: lighten($border, 10%);
|
||||
border-color: lighten($border, 6%);
|
||||
}
|
||||
.open & { &.dropdown-toggle {
|
||||
color: $color;
|
||||
background-color: lighten($background, 6%);
|
||||
border-color: lighten($border, 10%);
|
||||
border-color: lighten($border, 6%);
|
||||
} }
|
||||
&:active,
|
||||
&.active {
|
||||
|
||||
@@ -452,6 +452,7 @@ select:active, select:hover {
|
||||
// smaller and less padding
|
||||
padding-left: 3px;
|
||||
padding-right: 3px;
|
||||
line-height: 22px;
|
||||
|
||||
&:first-child{
|
||||
padding-left: 0;
|
||||
@@ -461,6 +462,23 @@ select:active, select:hover {
|
||||
padding-right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
// custom "remove" X icon for multi select
|
||||
.select2-selection__choice__remove {
|
||||
display: flex !important; // overwrite default
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 0; // hide default char
|
||||
|
||||
&:before {
|
||||
font-family: "Font Awesome 5 Free";
|
||||
content: "\f00d";
|
||||
font-weight: bold;
|
||||
display: inline-block;
|
||||
margin-right: 3px;
|
||||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.select2{
|
||||
@@ -1007,6 +1025,11 @@ table{
|
||||
width: 150px;
|
||||
transition-duration: 180ms;
|
||||
will-change: transform;
|
||||
|
||||
.panel-heading {
|
||||
text-align: right;
|
||||
padding: 6px 15px; // overwrite default
|
||||
}
|
||||
}
|
||||
|
||||
.pf-menu-left{
|
||||
@@ -1179,10 +1202,7 @@ table{
|
||||
transparent 75%,
|
||||
transparent);
|
||||
background-size: 25px 25px;
|
||||
-webkit-animation: move 2.5s linear infinite;
|
||||
-moz-animation: move 2.5s linear infinite;
|
||||
-ms-animation: move 2.5s linear infinite;
|
||||
animation: move 2.5s linear infinite;
|
||||
animation: move 6s linear infinite;
|
||||
}
|
||||
|
||||
.pf-system-info-rally{
|
||||
@@ -1964,7 +1984,7 @@ code {
|
||||
|
||||
.container-fluid{
|
||||
padding-left: 0; // overwrite default
|
||||
padding-right: 0; // verwrite default
|
||||
padding-right: 0; // overwrite default
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -228,6 +228,12 @@ $mapBubbleWidth: 30px;
|
||||
}
|
||||
}
|
||||
|
||||
.pf-map-region {
|
||||
.pf-system-head-region {
|
||||
display: block !important;
|
||||
}
|
||||
}
|
||||
|
||||
// class gets applied to body tag if system/connection gets dragged
|
||||
// to prevent cursor "flicker" we need to change the cursor for "neighbored" elements
|
||||
.jtk-drag-select{
|
||||
@@ -318,10 +324,10 @@ $mapBubbleWidth: 30px;
|
||||
}
|
||||
|
||||
.pf-system-head{
|
||||
padding: 0 3px 0 3px;
|
||||
padding: 0 3px 0 4px;
|
||||
cursor: pointer;
|
||||
font-family: Arial, sans-serif; // fix for element width on custom font family
|
||||
font-weight: bold;
|
||||
font-family: Oxygen, Arial, sans-serif;
|
||||
font-weight: bold; // fix for element width on custom font family
|
||||
white-space: nowrap;
|
||||
backface-visibility: hidden; // fixed blurry text on system scale() -> requires display: inline-block; transform: translateY(0); for child nodes
|
||||
|
||||
@@ -331,6 +337,7 @@ $mapBubbleWidth: 30px;
|
||||
min-width: 50px;
|
||||
color: $gray-lighter;
|
||||
margin-right: 2px;
|
||||
letter-spacing: 0.03em;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
transform: translateY(0); // fixed "blurry" text in scaled parent
|
||||
}
|
||||
@@ -376,25 +383,54 @@ $mapBubbleWidth: 30px;
|
||||
// ================================================================================================================
|
||||
.pf-system-head-info{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
flex-wrap: nowrap;
|
||||
color: lighten($gray-light, 10%);
|
||||
font-size: 10px;
|
||||
line-height: 10px;
|
||||
padding-right: 1px; // bring right aligned text in line with wh "effect" icon
|
||||
margin-bottom: 2px;
|
||||
transform: translateY(0); // fixed "blurry" text in scaled parent
|
||||
min-width: 100%; // required for text "truncate" inside
|
||||
max-width: 0; // required for text "truncate" inside
|
||||
|
||||
[class^="pf-system-sec-"]{
|
||||
cursor: help;
|
||||
}
|
||||
}
|
||||
|
||||
.pf-system-head-info-left{
|
||||
flex: 1;
|
||||
.pf-system-head-info-left,
|
||||
.pf-system-head-info-right, {
|
||||
display: inline-flex;
|
||||
flex: 1 1 auto;
|
||||
min-width: 0; // required for text "truncate" inside
|
||||
|
||||
&:empty{
|
||||
display: none;
|
||||
}
|
||||
> * {
|
||||
line-height: inherit;
|
||||
text-align: inherit;
|
||||
}
|
||||
|
||||
.pf-system-head-region{
|
||||
display: none; // triggered by map option
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
}
|
||||
|
||||
.pf-system-head-info-right{
|
||||
flex: 1;
|
||||
text-align: right;
|
||||
.pf-system-head-info-left {
|
||||
> *:not(:first-child){
|
||||
margin-left: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
.pf-system-head-info-right {
|
||||
justify-content: flex-end;
|
||||
|
||||
> *:not(:last-child){
|
||||
margin-right: 3px;
|
||||
}
|
||||
}
|
||||
|
||||
// ================================================================================================================
|
||||
@@ -617,7 +653,8 @@ $mapBubbleWidth: 30px;
|
||||
@include transition(stroke 0.18s ease-out, opacity 0.18s ease-out);
|
||||
will-change: all;
|
||||
|
||||
path{
|
||||
path {
|
||||
shape-rendering: geometricPrecision; // maybe better render quality ?!
|
||||
@include transition(stroke 0.18s ease-out);
|
||||
}
|
||||
|
||||
@@ -645,6 +682,7 @@ $mapBubbleWidth: 30px;
|
||||
|
||||
path:nth-child(2){
|
||||
stroke: darken($pink-darker, 8%);
|
||||
stroke-dasharray: 2px, 8px, 2px, 8px;
|
||||
}
|
||||
|
||||
&.jtk-hover{
|
||||
@@ -667,6 +705,7 @@ $mapBubbleWidth: 30px;
|
||||
|
||||
path:nth-child(2){
|
||||
stroke: $teal-lighter;
|
||||
stroke-dasharray: 15px, 10px, 5px, 10px, 5px, 10px;
|
||||
}
|
||||
|
||||
&.jtk-hover{
|
||||
@@ -720,11 +759,35 @@ $mapBubbleWidth: 30px;
|
||||
}
|
||||
}
|
||||
|
||||
.pf-map-connection-wh-size-s,
|
||||
.pf-map-connection-wh-size-s {
|
||||
|
||||
path:first-child {
|
||||
stroke-width: 7px;
|
||||
stroke-dasharray: 3px, 10px;
|
||||
stroke-linecap: square;
|
||||
}
|
||||
|
||||
path:nth-child(2) {
|
||||
stroke-width: 3px;
|
||||
}
|
||||
}
|
||||
|
||||
.pf-map-connection-wh-size-m {
|
||||
|
||||
path:nth-child(2){
|
||||
stroke-linecap: square !important; // smoother look for "inner" path
|
||||
path:first-child {
|
||||
stroke-dasharray: 20px, 4px;
|
||||
stroke-linecap: butt;
|
||||
}
|
||||
}
|
||||
|
||||
.pf-map-connection-wh-size-xl {
|
||||
|
||||
path:first-child {
|
||||
stroke-width: 9px;
|
||||
}
|
||||
|
||||
path:nth-child(2) {
|
||||
stroke-width: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ $check-icon: fa-content($fa-var-check) !default;
|
||||
border-color: $color;
|
||||
}
|
||||
&::after{
|
||||
color: #fff;
|
||||
color: $gray-lightest;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -87,6 +87,7 @@ $check-icon: fa-content($fa-var-check) !default;
|
||||
|
||||
&:focus + label::before{
|
||||
// @include tab-focus(); // no outline frame for Pathfinder
|
||||
border-color: $teal-lighter;
|
||||
}
|
||||
|
||||
&:checked + label::after{
|
||||
@@ -217,6 +218,7 @@ $check-icon: fa-content($fa-var-check) !default;
|
||||
|
||||
&:focus + label::before{
|
||||
// @include tab-focus(); // no outline frame for Pathfinder
|
||||
border-color: $teal-lighter;
|
||||
}
|
||||
|
||||
&:checked + label::after{
|
||||
|
||||
3
sass/library/select2/_multiple.scss
vendored
3
sass/library/select2/_multiple.scss
vendored
@@ -10,7 +10,8 @@
|
||||
-webkit-user-select: none;
|
||||
|
||||
.select2-selection__rendered {
|
||||
display: inline-block;
|
||||
//display: inline-block;
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
padding-left: 8px;
|
||||
text-overflow: ellipsis;
|
||||
|
||||
@@ -53,14 +53,15 @@
|
||||
}
|
||||
|
||||
.select2-results__option {
|
||||
padding: 3px 6px;
|
||||
padding: 2px 6px;
|
||||
min-height: 24px; // options with empty string '' should not collapse
|
||||
line-height: 22px;
|
||||
|
||||
> .clearfix.pf-result-image [class*="col-"]{
|
||||
line-height: 22px; // options with images need more height
|
||||
|
||||
img {
|
||||
height: 22px;
|
||||
display: block; // otherwise parent col- is 22,xx subpixel
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
float: left;
|
||||
|
||||
margin-right: 5px;
|
||||
margin-top: 5px;
|
||||
margin-top: 3px;
|
||||
padding: 0 5px;
|
||||
|
||||
color: $gray-dark;
|
||||
@@ -84,7 +84,8 @@
|
||||
|
||||
&.select2-container--focus {
|
||||
.select2-selection--multiple {
|
||||
border: solid $teal-lighter 1px;
|
||||
border-color: $input-border-focus;
|
||||
box-shadow: inset -1px 1px 5px 0 rgba(0, 0, 0, 0.8) !important;
|
||||
outline: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
height: 32px;
|
||||
|
||||
&:focus {
|
||||
border: 1px solid $teal-lighter;
|
||||
border-color: $input-border-focus;
|
||||
box-shadow: inset -1px 1px 5px 0 rgba(0, 0, 0, 0.8) !important;
|
||||
}
|
||||
|
||||
.select2-selection__rendered {
|
||||
@@ -81,8 +82,9 @@
|
||||
|
||||
&.select2-container--disabled {
|
||||
.select2-selection--single {
|
||||
background-color: #eee;
|
||||
background-color: $input-bg-disabled;
|
||||
cursor: default;
|
||||
pointer-events: none;
|
||||
|
||||
.select2-selection__clear {
|
||||
display: none;
|
||||
|
||||
@@ -439,9 +439,11 @@
|
||||
}
|
||||
|
||||
.note-editor.note-frame .note-statusbar .note-resizebar {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
height: 9px;
|
||||
padding-top: 1px;
|
||||
//padding-top: 1px;
|
||||
cursor: ns-resize
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user