Arranging Images on Slide - google-apps-script

I have a presentation with 6 images on separate slides and I want to write a script to rearrange them to one slide (on a grid formation).
I have already automated grabbing the images and adding them to the slides, but I cannot figure out how to arrange then automatically.
What would be some possible ways to go about it?

I am not confident but I think you can only 'copy' an image with insertImage(image)
Get an image
Copy to target slide
Set position setLeft(left) setTop(top)
Delete original image
Go back to 1 to handle another 4 images

Related

Is there any way to change a Google Slides presentation without reloading it?

I'm basically trying to build a game board. For simplicity's sake, imagine a Jeopardy! board. I'd like to be able to click on a square (imagine it says $200) and go to the question set for that square. Then, when I return to the main board, I'd like that square that I clicked on ($200) to be blank, so I know I've already clicked it.
I want to be able to do this in a full screen presentation, without having to reload the slideshow at all.
I'm thinking, hoping, I could do a script that would just straight-up replace the image of a screen with text on it, to an image of a blank screen, but I'd also be okay with building the slide with two layers of images - one with text above one without - and deleting the top layer when it's clicked.
Click on and it becomes this:
Replacing the image via script can be easily done by using the following script:
function myFunction() {
var image = SlidesApp.getActivePresentation().getSlides()[0].getImages()[0];
// Get the Drive image file with the given ID.
var driveImage = DriveApp.getFileById('File ID of the new image');
image.replace(driveImage);
}
But unfortunately, assigning an image to act as a button to run script is only available on Google Spreadsheet. And by further checking it seems somebody already submitted a Feature Request for such a feature to be implemented on Google Slides as well.
References:
https://developers.google.com/apps-script/reference/slides/image#replace(BlobSource)

Can I pull a subset of a CSS grid (say a full column/row) using JQuery from one page to another?

Basically I have a CSS grid that is populated. Let's say 5 x 5. Is there any way I can transpose area 1 x 5 (first column) from one page onto another? Or even just move it around on the page?
Jquery has a clone function https://api.jquery.com/clone/
And from one page to another, you could use browser storage to copy this dom element, and past it to you second page

How to bind multiple events on a images in adaptive cards

I am trying to achieve following scenarios through adaptive cards. I have tried many ways but still not able to reach any far by my expectation.
Scenario one
I am trying to build a feedback rating card which has 3 images. As soon as a user clicks on any of the image, I would like both Action.ToggleVisibility and Action.Submit event to trigger at the same time. Is it possible to bind two events on a image in adaptive cards?
Scenario two
Since the first option did not work for me, I tried to add the radio buttons along with the existing images and a Submit button separately. But this time, It was found that the radio button does not have an option to associate an image with it. Also, the alignment of the choice set cannot be changed from vertical to horizontal. Is there any workaround for this?

Displaying image content types as grids in drupal 7?

I am currently using the Views and Display Suite modules to create a page that works as an image gallery. You click on the menu button to take you to a page (the view) that has multiple links to nodes (individual galleries).
When you click these nodes, they take you into the separate page and show all images uploaded using the "event" content type that I made.
The event content type has one field (type: image) that uses a multiupload widget, allowing for multiple file uploads.
However, the images on the node are displayed within divs, so they all have their own rows basically. I would like to know if it was possible to put them all into grids, and if so; how? I tried using display suite, but I only have that one field to work with.
If you want to get a fully customized page and arrange the fields just like you want, use the theme suggestions.
For a node of type "event", as you said, it would be node--event.tpl.php. You can duplicate the code inside the base template node.tpl.php of your parent theme (or if you don't have one, of Bartik for example) to have a good starting material.
Just rearrange the div, the tags, the variables as your convenience, add some custom CSS to make your grid, and you should be done!
I hope it helps.

put images in split by pages

I have 100 images to put on my website in one div. I want to put 20 images and give page numbers in the down, so that if user clicks on '2' it takes to next 20 images. How is this possible. I have tried searching, but could not find any answer
Depends really how your page serves these images. If you have a static HTML page then your only option would be to use JavaScript/jQuery.
If info about your images is serves from a database behind your web application then you can use pagination and routing. For instance you could have an url http://mydomain.com/images and this would select the first 20 images from your database then bellow you gallery you can have a set of links Previous and Next and when you click on Next it takes you to the url http://mydomain.com/images/20 still the gallery page only /20 appended to it to use as an offset for your SQL Query.
Tho seems what you really need is just a simply jQuery image gallery something like this:
http://www.tn3gallery.com/?refCode=fe8775
http://galleria.io/
http://spaceforaname.com/galleryview/#
http://tympanus.net/codrops/2010/06/24/multimedia-gallery/