Skip to content

Commit

Permalink
Implement new screenshot api.
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewtoups committed Aug 26, 2021
1 parent 54b6f4d commit 33b5702
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions scripts/components/poem/poem.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ define(['ko', 'api', 'utils/noOrphans'], function(ko, api){
self.birthChart = params.birthChart;
if (!vm.screenshotMode()){
api.screenshot(params.birthChart).then(data => {
vm.screenshot( `${api.hostName()}/screenshots/${data}/an-orb-poem-of-ones-own.jpg`);
vm.screenshotPlacements(`${api.hostName()}/screenshots/${data}/an-orb-poem-of-ones-own-placements.jpg`);
const shots = JSON.parse(data);
vm.screenshot(`${api.hostName()}/${shots.screenshot}`);
vm.screenshotPlacements(`${api.hostName()}/${shots.placements}`);
api.printPreview(params.birthChart).then(data => {
vm.printScreenshot( `${api.hostName()}/printPreviews/${data}/printPreview.png`);
const previews = JSON.parse(data);
vm.printScreenshot(`${api.hostName()}/${previews.screenshot}`);
});
});
}
Expand Down

0 comments on commit 33b5702

Please sign in to comment.