# HG changeset patch # User Thomas Junk # Date 1564653456 -7200 # Node ID 33deb863478305f68bea7a8ed522144ae27da2b5 # Parent a41fd26c1644bfc35b6eef57d725b98ab527e68c mixin: set relative defaults for margins diff -r a41fd26c1644 -r 33deb8634783 client/src/lib/mixins.js --- a/client/src/lib/mixins.js Thu Aug 01 11:47:27 2019 +0200 +++ b/client/src/lib/mixins.js Thu Aug 01 11:57:36 2019 +0200 @@ -52,16 +52,16 @@ methods: { getDimensions({ svgWidth, svgHeight, main, nav }) { const mainMargin = main || { - top: 20, - right: 80, - bottom: 60, - left: 80 + top: Math.floor(0.08 * svgHeight), + right: Math.floor(0.08 * svgWidth), + bottom: Math.floor(0.2 * svgHeight), + left: Math.floor(0.08 * svgWidth) }; const navMargin = nav || { - top: svgHeight - mainMargin.top - 65, - right: 20, - bottom: 30, - left: 80 + top: Math.floor(0.78 * svgHeight), + right: Math.floor(0.013 * svgWidth), + bottom: Math.floor(0.095 * svgHeight), + left: Math.floor(0.07 * svgWidth) }; const width = Number(svgWidth) - mainMargin.left - mainMargin.right; const mainHeight = Number(svgHeight) - mainMargin.top - mainMargin.bottom;