kopia lustrzana https://github.com/backface/turtlestitch
made sure project thumbnails are normalized when saved
rodzic
d9355f4adf
commit
1a855f81ed
16
cloud.js
16
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',
|
||||
|
|
|
@ -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 ===
|
||||
|
|
Ładowanie…
Reference in New Issue