From bc115a7dab837b52ae3a0a76843efb70dd9f4e20 Mon Sep 17 00:00:00 2001 From: Iam Naughton Phier Date: Sat, 28 Feb 2015 16:12:53 +0200 Subject: [PATCH] this isn't right either. putting live to get feedback. --- sahli.coffee | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sahli.coffee b/sahli.coffee index 7b8f74e..d41af88 100644 --- a/sahli.coffee +++ b/sahli.coffee @@ -252,12 +252,12 @@ class @Sahli fullpicheight = 0 fullpicheight = (fullpicheight + i.height) for i in canvs - stripe_width = 640 + stripe_width = ww/Math.ceil(fullpicheight/ww) num_strips = Math.sqrt (ww/stripe_width)*(fullpicheight/wh) - numcols = Math.ceil num_strips + numcols = Math.floor num_strips-1 - scaling_factor = num_strips * wh / fullpicheight + scaling_factor = num_strips * (wh / fullpicheight) # newheight = canvs[0].height * scaling_factor # $(canvs[0]).height newheight