commit 0cc6f095866e93843332084a7fca7f74f83f62c2
parent 44aba94055cb41376c39be0821deb1449b85a74d
Author: Milan Pässler <me@pbb.lc>
Date: Wed, 22 Jul 2020 15:36:13 +0200
parent 44aba94055cb41376c39be0821deb1449b85a74d
Author: Milan Pässler <me@pbb.lc>
Date: Wed, 22 Jul 2020 15:36:13 +0200
remove fancy canvas option
3 files changed, 0 insertions(+), 13 deletions(-)
diff --git a/client/js/canvas.js b/client/js/canvas.js @@ -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);
diff --git a/client/js/languages.js b/client/js/languages.js @@ -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',
diff --git a/client/js/settingsView.js b/client/js/settingsView.js @@ -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;