From 288893999c04a2cbe9adbc61ae7d753913bdb07e Mon Sep 17 00:00:00 2001 From: Yuval Adam Date: Tue, 7 Jul 2015 17:44:02 +0300 Subject: Partial canvas overflow fix --- client/button.js | 8 ++++++-- client/effects.js | 2 ++ client/templates/photos.html | 4 ++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/client/button.js b/client/button.js index d4336d5..f483e8e 100644 --- a/client/button.js +++ b/client/button.js @@ -105,6 +105,11 @@ function animate2() { delay += 400 * photos.length; delay += 2000; + var canvas = document.getElementById('canvas-final'); + var dataUrl = canvas.toDataURL(); + $('a.share-save').attr('href', dataUrl); + $('a.share-save').attr('download', new Date().getTime()); + _.delay(function() { $('h2.title').html('Done!
This is your icon!
'); $('div.final div.final-dominants').hide(); @@ -112,7 +117,6 @@ function animate2() { $('div.about-link').show(); }, delay + 2000); - } Template.layout.events({ @@ -210,7 +214,7 @@ Template.photos.events({ window.print(); }, 'click button.share-save': function (event) { - window.print(); + }, 'click button.share-print': function (event) { window.print(); diff --git a/client/effects.js b/client/effects.js index fd26bf7..f5898fe 100644 --- a/client/effects.js +++ b/client/effects.js @@ -84,6 +84,8 @@ Effects = (function() { Session.set(id + ':colors', cols); Session.set(id + ':palette', valued_centroids); Session.set(id + ':newcolors', newcols); + + canvas.style.position = 'static'; }); } diff --git a/client/templates/photos.html b/client/templates/photos.html index 7cd3055..be52338 100644 --- a/client/templates/photos.html +++ b/client/templates/photos.html @@ -55,7 +55,7 @@ - + @@ -66,7 +66,7 @@ -- cgit v1.3.1