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 settings /////////////////////////////////////////////////////
|
||||||
|
|
||||||
/*global modules, SnapSerializer, nop, hex_sha512, DialogBoxMorph, Color*/
|
/*global modules, SnapSerializer, nop, hex_sha512, DialogBoxMorph, Color,
|
||||||
|
normalizeCanvas*/
|
||||||
|
|
||||||
modules.cloud = '2018-February-08';
|
modules.cloud = '2018-February-08';
|
||||||
|
|
||||||
|
@ -320,8 +321,10 @@ Cloud.prototype.saveProject = function (ide, onSuccess, onError) {
|
||||||
function (username) {
|
function (username) {
|
||||||
if (username) {
|
if (username) {
|
||||||
var xml = ide.serializer.serialize(ide.stage),
|
var xml = ide.serializer.serialize(ide.stage),
|
||||||
thumbnail = ide.stage.thumbnail(
|
thumbnail = normalizeCanvas(
|
||||||
SnapSerializer.prototype.thumbnailSize).toDataURL(),
|
ide.stage.thumbnail(
|
||||||
|
SnapSerializer.prototype.thumbnailSize
|
||||||
|
)).toDataURL(),
|
||||||
body, mediaSize, size;
|
body, mediaSize, size;
|
||||||
|
|
||||||
ide.serializer.isCollectingMedia = true;
|
ide.serializer.isCollectingMedia = true;
|
||||||
|
@ -452,8 +455,11 @@ Cloud.prototype.getThumbnail = function (
|
||||||
) {
|
) {
|
||||||
this[username ? 'request' : 'withCredentialsRequest'](
|
this[username ? 'request' : 'withCredentialsRequest'](
|
||||||
'GET',
|
'GET',
|
||||||
'/projects/' + (username || '%username') + '/'
|
'/projects/' +
|
||||||
+ projectName + '/thumbnail',
|
(username || '%username') +
|
||||||
|
'/' +
|
||||||
|
projectName +
|
||||||
|
'/thumbnail',
|
||||||
onSuccess,
|
onSuccess,
|
||||||
onError,
|
onError,
|
||||||
'Could not fetch thumbnail',
|
'Could not fetch thumbnail',
|
||||||
|
|
|
@ -3939,6 +3939,7 @@ Translation Updates:
|
||||||
* Cloud, GUI, Widgets: New Cloud API, thanks, Bernat!
|
* Cloud, GUI, Widgets: New Cloud API, thanks, Bernat!
|
||||||
* GUI: fixed a url-bar refresh bug introduced by the new cloud mechanism
|
* 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
|
* 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 ===
|
=== v4.1.2 features ===
|
||||||
|
|
Ładowanie…
Reference in New Issue