From 5c43f4d2027ef55d5cd7b3ec932ffce7ea25d4a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcus=20F=C3=B6rster?= Date: Sat, 24 Jun 2023 09:24:02 +0200 Subject: [PATCH] proposal; drop SVG arrow calculation --- js/prev-next-button.js | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/js/prev-next-button.js b/js/prev-next-button.js index 22e8dd6..1d8636b 100644 --- a/js/prev-next-button.js +++ b/js/prev-next-button.js @@ -62,17 +62,8 @@ PrevNextButton.prototype.createSVG = function( label, arrowShape ) { function getArrowMovements( shape ) { // use shape as movement if string if ( typeof shape == 'string' ) return shape; - - let { x0, x1, x2, x3, y1, y2 } = shape; - - // create movement string - return `M ${x0}, 50 - L ${x1}, ${y1 + 50} - L ${x2}, ${y2 + 50} - L ${x3}, 50 - L ${x2}, ${50 - y2} - L ${x1}, ${50 - y1} - Z`; + // return fallback `arrow left` + return `m10 50 50 50 10-10-40-40 40-40-10-10Z`; } // ----- ----- //