diff --git a/examples/demo.js b/examples/demo.js index 75c71f31..796968e8 100644 --- a/examples/demo.js +++ b/examples/demo.js @@ -118,6 +118,9 @@ window.onload = function () { } else if(dropDownValue == 'save-pdf') { savePDF(getLastImage()); } + else if (dropDownValue == 'save-to-publiclab.org' ){ + SaveToPubliclab(); + } }); let isWorkingOnGifGeneration = false; @@ -251,6 +254,18 @@ window.onload = function () { download(image, 'index.gif', 'image/gif');// downloadjs library function } + function SaveToPubliclab() { + function postToPL(imgSrc) { + var uniq = Date.now(); + $('body').append('
'); + f = $('#postToPL' + uniq)[0]; + f.datauri_main_image.value = imgSrc; + window.open('', 'postToPLWindow'); + f.submit(); + } + postToPL($('img')[sequencer.steps.length - 1].src); + } + // image selection and drag/drop handling from examples/lib/imageSelection.js sequencer.setInputStep({ dropZoneSelector: '#dropzone', @@ -289,4 +304,4 @@ window.onload = function () { } else { insertPreview.updatePreviews('images/tulips.png', '#addStep'); } -}; +}; \ No newline at end of file diff --git a/examples/index.html b/examples/index.html index 75b94570..240c19fa 100644 --- a/examples/index.html +++ b/examples/index.html @@ -196,6 +196,7 @@ + >

@@ -240,4 +241,4 @@ - + \ No newline at end of file