diff --git a/cloud.js b/cloud.js index f206f6a5..70445e6b 100644 --- a/cloud.js +++ b/cloud.js @@ -29,7 +29,8 @@ // Global settings ///////////////////////////////////////////////////// -/*global modules, SnapSerializer, nop, hex_sha512, DialogBoxMorph, Color*/ +/*global modules, SnapSerializer, nop, hex_sha512, DialogBoxMorph, Color, +normalizeCanvas*/ modules.cloud = '2018-February-08'; @@ -320,8 +321,10 @@ Cloud.prototype.saveProject = function (ide, onSuccess, onError) { function (username) { if (username) { var xml = ide.serializer.serialize(ide.stage), - thumbnail = ide.stage.thumbnail( - SnapSerializer.prototype.thumbnailSize).toDataURL(), + thumbnail = normalizeCanvas( + ide.stage.thumbnail( + SnapSerializer.prototype.thumbnailSize + )).toDataURL(), body, mediaSize, size; ide.serializer.isCollectingMedia = true; @@ -452,8 +455,11 @@ Cloud.prototype.getThumbnail = function ( ) { this[username ? 'request' : 'withCredentialsRequest']( 'GET', - '/projects/' + (username || '%username') + '/' - + projectName + '/thumbnail', + '/projects/' + + (username || '%username') + + '/' + + projectName + + '/thumbnail', onSuccess, onError, 'Could not fetch thumbnail', diff --git a/history.txt b/history.txt index 59cd149c..68162bdb 100755 --- a/history.txt +++ b/history.txt @@ -3939,6 +3939,7 @@ Translation Updates: * Cloud, GUI, Widgets: New Cloud API, thanks, Bernat! * GUI: fixed a url-bar refresh bug introduced by the new cloud mechanism * GUI: made sure user names are lower case when sent to the cloud +* Cloud: made sure project thumbnails are normalized when saved === v4.1.2 features ===