MCPcopy
hub / github.com/tdewolff/minify / normalizeLineDash

Function normalizeLineDash

_benchmarks/sample_echarts.js:26557–26568  ·  view source on GitHub ↗
(lineType, lineWidth)

Source from the content-addressed store, hash-verified

26555 }
26556
26557 function normalizeLineDash(lineType, lineWidth) {
26558 if (!lineType || lineType === 'solid' || !(lineWidth > 0)) {
26559 return null;
26560 }
26561 lineWidth = lineWidth || 1;
26562 return lineType === 'dashed'
26563 ? [4 * lineWidth, 2 * lineWidth]
26564 : lineType === 'dotted'
26565 ? [lineWidth]
26566 : isNumber(lineType)
26567 ? [lineType] : isArray(lineType) ? lineType : null;
26568 }
26569
26570 var pathProxyForDraw = new PathProxy(true);
26571 function styleHasStroke(style) {

Callers 3

brushPathFunction · 0.85
brushTextFunction · 0.85
bindStyleFunction · 0.85

Calls 2

isNumberFunction · 0.70
isArrayFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…