remove fancy canvas option
This commit is contained in:
parent
44aba94055
commit
0cc6f09586
|
@ -74,7 +74,6 @@ export const setupCanvas = (data) => {
|
|||
const addTextToCache = (text, color, fixedHeight) => {
|
||||
const canvas = document.createElement('canvas');
|
||||
const ctx = canvas.getContext('2d');
|
||||
ctx.shadowBlur = dataStorage.settings.fancyCanvas ? 5 : 0;
|
||||
ctx.shadowColor = '#00000080';
|
||||
|
||||
let height, width
|
||||
|
@ -120,7 +119,6 @@ const updateTextCache = () => {
|
|||
};
|
||||
|
||||
const renderJourneys = () => {
|
||||
ctx.shadowBlur = 0;
|
||||
ctx.clearRect(0, 0, canvas.width / dpr, canvas.height / dpr);
|
||||
let x = canvasState.offsetX, y;
|
||||
|
||||
|
@ -153,7 +151,6 @@ const renderJourneys = () => {
|
|||
|
||||
const p = new Path2D('M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z');
|
||||
ctx.fillStyle = '#fff';
|
||||
ctx.shadowBlur = dataStorage.settings.fancyCanvas ? 5 : 0;
|
||||
ctx.shadowColor = '#00000080';
|
||||
ctx.save();
|
||||
ctx.scale(3, 3);
|
||||
|
@ -180,7 +177,6 @@ const renderJourneys = () => {
|
|||
|
||||
y = (start - firstDeparture) * scaleFactor + 32;
|
||||
|
||||
ctx.shadowBlur = 0;
|
||||
ctx.fillStyle = '#44444480';
|
||||
ctx.strokeStyle = '#ffffff80';
|
||||
ctx.fillRect(x-padding, y, rectWidth, duration);
|
||||
|
@ -200,7 +196,6 @@ const renderJourneys = () => {
|
|||
|
||||
y = (start - firstDeparture) * scaleFactor + 32;
|
||||
|
||||
ctx.shadowBlur = dataStorage.settings.fancyCanvas ? 10 : 0;
|
||||
ctx.shadowColor = '#00000060';
|
||||
|
||||
if (leg.isWalking || leg.isTransfer) {
|
||||
|
@ -211,7 +206,6 @@ const renderJourneys = () => {
|
|||
ctx.fillRect(x, y, rectWidth, duration);
|
||||
}
|
||||
|
||||
ctx.shadowBlur = 0;
|
||||
|
||||
let preRenderedText = textCache[textFor(leg)];
|
||||
if ((preRenderedText.height / dpr) < duration - 5) {
|
||||
|
@ -221,7 +215,6 @@ const renderJourneys = () => {
|
|||
}
|
||||
|
||||
if (leg.cancelled) {
|
||||
ctx.shadowBlur = 5;
|
||||
ctx.strokeStyle = '#cc4444ff';
|
||||
ctx.lineWidth = 5;
|
||||
ctx.beginPath();
|
||||
|
@ -249,7 +242,6 @@ const renderJourneys = () => {
|
|||
x += rectWidthWithPadding;
|
||||
}
|
||||
ctx.fillStyle = '#fff';
|
||||
ctx.shadowBlur = dataStorage.settings.fancyCanvas ? 5 : 0;
|
||||
ctx.shadowColor = '#00000080';
|
||||
ctx.save();
|
||||
ctx.scale(3, 3);
|
||||
|
|
|
@ -39,7 +39,6 @@ export const languages = {
|
|||
'showds100': 'Zeige RIL100 Kürzel (wenn verfügbar)',
|
||||
'showdebug': 'Schreibe Debug Nachrichten ins Log',
|
||||
'graphical': 'Graphische Darstellung in der Verbindungsübersicht',
|
||||
'fancy': 'Schöne Grafik',
|
||||
'update': 'Anwendung updaten',
|
||||
'language': 'Sprache',
|
||||
'de': 'Deutsch',
|
||||
|
@ -93,7 +92,6 @@ export const languages = {
|
|||
'showds100': 'Show DS100 (if available)',
|
||||
'showdebug': 'Write debug messages to log',
|
||||
'graphical': 'Graphical overview for journeys',
|
||||
'fancy': 'Use fancy graphics',
|
||||
'update': 'Update application',
|
||||
'language': 'Language',
|
||||
'de': 'German',
|
||||
|
|
|
@ -15,7 +15,6 @@ const settingsTemplate = () => html`
|
|||
<label><input type="checkbox" ?checked=${dataStorage.settings.showRIL100Names} id="ril100"> ${t('showds100')}</label><br>
|
||||
<label><input type="checkbox" ?checked=${dataStorage.settings.writeDebugLog} id="debug-messages"> ${t('showdebug')}</label><br>
|
||||
<label><input type="checkbox" ?checked=${dataStorage.settings.enableCanvas} id="enable-canvas"> ${t('graphical')} <b>BETA</b></label><br>
|
||||
<label><input type="checkbox" ?checked=${dataStorage.settings.fancyCanvas} id="fancy-canvas"> ${t('fancy')}<label><br>
|
||||
<label><input type="checkbox" ?checked=${dataStorage.settings.travelynx} id="travelynx"> ${t('travelynx-checkin')}<label><br>
|
||||
<label><input type="checkbox" ?checked=${dataStorage.settings.advancedSelection} id="advancedSelection">ADVANCED® selection of trains<label><br>
|
||||
<br>
|
||||
|
@ -45,14 +44,12 @@ const saveSettings = async () => {
|
|||
const show_ril100 = ElementById('ril100').checked;
|
||||
const write_debug = ElementById('debug-messages').checked;
|
||||
const enable_canvas = ElementById('enable-canvas').checked;
|
||||
const fancy_canvas = ElementById('fancy-canvas').checked;
|
||||
const travelynx = ElementById('travelynx').checked;
|
||||
const advancedSelection = ElementById('advancedSelection').checked;
|
||||
|
||||
dataStorage.settings.showRIL100Names = show_ril100;
|
||||
dataStorage.settings.writeDebugLog = write_debug;
|
||||
dataStorage.settings.enableCanvas = enable_canvas;
|
||||
dataStorage.settings.fancyCanvas = fancy_canvas;
|
||||
dataStorage.settings.language = language;
|
||||
dataStorage.settings.travelynx = travelynx;
|
||||
dataStorage.settings.advancedSelection = advancedSelection;
|
||||
|
|
Loading…
Reference in a new issue