express-image-placeholder
Advanced tools
Comparing version 4.0.2 to 4.0.3
12
index.js
@@ -14,6 +14,6 @@ /** | ||
const BORDER_WIDTH = 2; | ||
const LINE_WIDTH = 1; | ||
const CROSS_CHARACTER = '\u{02A2F}'; | ||
const DARK_RATIO = 0.5; | ||
const DOUBLE_BORDER_WIDTH = BORDER_WIDTH * 2; | ||
const DOUBLE_LINE_WIDTH = LINE_WIDTH * 2; | ||
const FONT_SIZE = 18; | ||
@@ -59,3 +59,3 @@ const LABEL_BACKGROUND_OFFSET = 8; | ||
ctx.fillStyle = primaryColor; | ||
ctx.fillRect(BORDER_WIDTH, BORDER_WIDTH, width - DOUBLE_BORDER_WIDTH, height - DOUBLE_BORDER_WIDTH); | ||
ctx.fillRect(LINE_WIDTH, LINE_WIDTH, width - DOUBLE_LINE_WIDTH, height - DOUBLE_LINE_WIDTH); | ||
} else { | ||
@@ -68,3 +68,3 @@ ctx.fillStyle = primaryColor; | ||
ctx.strokeStyle = secondaryColor; | ||
ctx.lineWidth = 1; | ||
ctx.lineWidth = LINE_WIDTH; | ||
@@ -87,5 +87,5 @@ ctx.beginPath(); | ||
ctx.fillRect( | ||
0 + BORDER_WIDTH, | ||
0 + LINE_WIDTH, | ||
(height - FONT_SIZE) / 2 - LABEL_BACKGROUND_OFFSET, | ||
width - DOUBLE_BORDER_WIDTH, | ||
width - DOUBLE_LINE_WIDTH, | ||
FONT_SIZE + 2 * LABEL_BACKGROUND_OFFSET | ||
@@ -92,0 +92,0 @@ ); |
{ | ||
"name": "express-image-placeholder", | ||
"version": "4.0.2", | ||
"version": "4.0.3", | ||
"description": "Express router-level middleware for delivering simple test images.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
12073