MediaWiki:LeadingAndTrailingCells.js: Difference between revisions
Jump to navigation
Jump to search
MediaWiki:LeadingAndTrailingCells.js (view source)
Revision as of 13:13, 11 November 2019
, 13:13, 11 November 2019no edit summary
Miraheze>Marshall m (Protected "MediaWiki:LeadingAndTrailingCells.js": Run as Javascript ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite) [Delete=Allow only administrators] (indefinite))) |
Miraheze>Marshall No edit summary |
||
Line 1: | Line 1: | ||
let div = (a,b) => Math.floor(a/b); | let div = (a,b) => Math.floor(a/b); | ||
const sc = 0.7; | |||
let svg = d3.select('.LeadingAndTrailingCells') | let svg = d3.select('.LeadingAndTrailingCells') | ||
.append('svg') | .append('svg').attrs({height:890*sc, width:620*sc}) | ||
.append('g') | |||
.attr('transform','scale(sc)') | |||
.attr('font-size',46) | .attr('font-size',46) | ||
.attr('text-anchor','middle'); | .attr('text-anchor','middle'); | ||
Line 22: | Line 24: | ||
} | } | ||
let Wo= | let Wo= w/2+10, | ||
W = (shape[rank-1]-1)*w, | W = (shape[rank-1]-1)*w, | ||
Wg= 180, | Wg= 180, |