From 1b5e55dc5cadebec9dcfda1633cd85d35e8688b8 Mon Sep 17 00:00:00 2001 From: Brett Zamir Date: Wed, 9 Apr 2014 01:13:05 +0000 Subject: [PATCH] Simplify jsPDF switch git-svn-id: http://svg-edit.googlecode.com/svn/trunk@2801 eee81c28-f429-11dd-99c0-75d572ba1ddd --- editor/jspdf/jspdf.js | 32 ++++++++------------------------ 1 file changed, 8 insertions(+), 24 deletions(-) diff --git a/editor/jspdf/jspdf.js b/editor/jspdf/jspdf.js index e50eb857..8810ed89 100644 --- a/editor/jspdf/jspdf.js +++ b/editor/jspdf/jspdf.js @@ -991,30 +991,14 @@ PubSub implementation }; switch (unit) { - case 'pt': - k = 1; - break; - case 'mm': - k = 72 / 25.4; - break; - case 'cm': - k = 72 / 2.54; - break; - case 'in': - k = 72; - break; - case 'px': - k = 96 / 72; - break; - case 'pc': - k = 12; - break; - case 'em': - k = 12; - break; - case 'ex': - k = 6; - break; + case 'pt': k = 1; break; + case 'mm': k = 72 / 25.4; break; + case 'cm': k = 72 / 2.54; break; + case 'in': k = 72; break; + case 'px': k = 96 / 72; break; + case 'pc': k = 12; break; + case 'em': k = 12; break; + case 'ex': k = 6; break; default: throw ('Invalid unit: ' + unit); }