From 515708804aaba248f900e6a17b2817ed7af53d99 Mon Sep 17 00:00:00 2001 From: Roy Francis Date: Thu, 1 Aug 2024 23:15:45 +0200 Subject: [PATCH] Height disabled for grid when captions displayed over --- docs/articles/pixfigure.html | 56 +++---- .../pixfigure.js | 0 docs/articles/pixgallery.html | 158 +++++++++--------- .../pixgallery.js | 6 +- docs/pkgdown.yml | 2 +- .../pixgallery-binding-0.0.3/pixgallery.js | 6 +- docs/reference/pixfigure.html | 2 +- docs/reference/pixgallery.html | 2 +- docs/search.json | 2 +- inst/htmlwidgets/pixgallery.js | 6 +- vignettes/pixgallery.qmd | 2 +- 11 files changed, 121 insertions(+), 121 deletions(-) rename docs/articles/pixfigure_files/libs/{pixfigure-binding-0.0.2.4000 => pixfigure-binding-0.0.3}/pixfigure.js (100%) rename docs/articles/pixgallery_files/libs/{pixgallery-binding-0.0.2.4000 => pixgallery-binding-0.0.3}/pixgallery.js (97%) diff --git a/docs/articles/pixfigure.html b/docs/articles/pixfigure.html index 20d1749..ea67310 100644 --- a/docs/articles/pixfigure.html +++ b/docs/articles/pixfigure.html @@ -20,7 +20,7 @@ - + @@ -92,8 +92,8 @@

Pixfigure usage

 pixfigure(paths[1])
-
- +
+

@@ -104,8 +104,8 @@

Pixfigure usage

 pixfigure(paths[1], caption = "Night sky over the mountains")
-
- +
+

Pixfigure usage

 pixfigure(paths[1:2], link = FALSE)
-
- +
+
 pixfigure(paths[1:2], caption = c("Night sky over the mountains", "Though the dense rainforest"), link = FALSE)
-
- +
+

By setting this to a character vector, you can add custom links.

@@ -133,16 +133,16 @@

Pixfigure usage

 pixfigure(paths[1:2], link = c("https://en.wikipedia.org/wiki/Milky_Way", "https://en.wikipedia.org/wiki/Rainforest"))
-
- +
+
 pixfigure(paths[1:2], caption = c("Night sky over the mountains", "Through the dense rainforest"), link = c("https://en.wikipedia.org/wiki/Milky_Way", "https://en.wikipedia.org/wiki/Rainforest"))
-
- +
+

@@ -153,16 +153,16 @@

Pixfigure usage

 pixfigure(paths[1], w = "400px")
-
- +
+
 pixfigure(paths[3], h = "400px", caption = "shark")
-
- +
+

@@ -173,8 +173,8 @@

Pixfigure usage

 pixfigure(paths[1], h = "600px")
-
- +
+

Resize the width of the page to see the effect of fit="cover". The image scales within it’s frame rather than shrink. Explore css property object-fit for more details, for example, on w3schools.

@@ -186,16 +186,16 @@

Pixfigure usage

 pixfigure(paths[1], h = "400px", w = "400px", position = "left")
-
- +
+
 pixfigure(paths[1], h = "400px", w = "400px", position = "right")
-
- +
+

Here is a youtube video that discusses fit and position.

@@ -207,8 +207,8 @@

Pixfigure usage

 pixfigure(paths, caption = c("Night sky over the mountains", "Walking through dense woodland", "Out in the open seas"), h = "200px", w = "250px", position = "left")
-
- +
+

@@ -226,8 +226,8 @@

Pixfigure usage

 pixfigure("images/pexels-photo-3126574.jpg", h = "300px")
-
- +
+

@@ -273,7 +273,7 @@

Pixfigure usage

[1] stats graphics grDevices utils datasets methods base other attached packages: -[1] pixture_0.0.2.4000 +[1] pixture_0.0.3 loaded via a namespace (and not attached): [1] digest_0.6.36 later_1.3.2 R6_2.5.1 httpuv_1.6.15 diff --git a/docs/articles/pixfigure_files/libs/pixfigure-binding-0.0.2.4000/pixfigure.js b/docs/articles/pixfigure_files/libs/pixfigure-binding-0.0.3/pixfigure.js similarity index 100% rename from docs/articles/pixfigure_files/libs/pixfigure-binding-0.0.2.4000/pixfigure.js rename to docs/articles/pixfigure_files/libs/pixfigure-binding-0.0.3/pixfigure.js diff --git a/docs/articles/pixgallery.html b/docs/articles/pixgallery.html index af53a85..bea99b0 100644 --- a/docs/articles/pixgallery.html +++ b/docs/articles/pixgallery.html @@ -20,7 +20,7 @@ - + @@ -131,8 +131,8 @@

Pixgallery usage

 pixgallery(paths_a)
-
- +
+

@@ -144,8 +144,8 @@

Pixgallery usage

captions <- c("night", "forest", "shark", "coconut trees", "flowers", "field", "misty", "leaves", "sunset", "mountains", "swamp", "rainstorm", "leaves", "beach", "leopard", "sunflower") pixgallery(paths_a, caption = captions)
-
- +
+

Images without captions can be set as NA.

@@ -153,16 +153,16 @@

Pixgallery usage

 pixgallery(paths_a[1:4], caption = c("night", "forest", NA, "coconut trees"))
-
- +
+
 pixgallery(paths_a[1], caption = "night")
-
- +
+

@@ -174,32 +174,32 @@

Pixgallery usage

 pixgallery(paths_a[1:4], caption = captions[1:4], caption_valign = "top")
-
- +
+
 pixgallery(paths_a[1:4], caption = captions[1:4], caption_valign = "center")
-
- +
+
 pixgallery(paths_a[1:4], caption = captions[1:4], caption_valign = "bottom")
-
- +
+
 pixgallery(paths_a[1:4], caption = captions[1:4], caption_valign = "below")
-
- +
+

caption_halign options are left, center or right.

@@ -207,16 +207,16 @@

Pixgallery usage

 pixgallery(paths_a[1:4], caption = captions[1:4], caption_valign = "center", caption_halign = "center")
-
- +
+
 pixgallery(paths_a[1:4], caption = captions[1:4], caption_valign = "below", caption_halign = "center")
-
- +
+

Pixgallery usage

 pixgallery(paths_a[1:4], link = FALSE)
-
- +
+

By setting this to a character vector, you can add custom links.

@@ -236,8 +236,8 @@

Pixgallery usage

 pixgallery(paths_a[1:4], link = c("https://en.wikipedia.org/wiki/Milky_Way", "https://en.wikipedia.org/wiki/Rainforest", "https://en.wikipedia.org/wiki/Shark", "https://en.wikipedia.org/wiki/Hawaii"))
-
- +
+

@@ -248,16 +248,16 @@

Pixgallery usage

 pixgallery(paths_a, h = "50px")
-
- +
+
 pixgallery(paths_b, w = "100px")
-
- +
+

@@ -268,16 +268,16 @@

Pixgallery usage

 pixgallery(paths_a[1:8], gap = "20px")
-
- +
+
 pixgallery(paths_a, gap = "0", w = "40px")
-
- +
+

@@ -288,8 +288,8 @@

Pixgallery usage

 pixgallery(paths_a, w = "100px", border_radius = "10px")
-
- +
+

@@ -300,16 +300,16 @@

Pixgallery usage

 pixgallery(paths_a, w = "50px", shuffle = TRUE)
-
- +
+
 pixgallery(paths_a, w = "50px", shuffle = TRUE, caption = c("night", "forest", "shark", "coconut trees", "flowers", "field", "misty", "leaves", "sunset", "mountains", "swamp", "rainstorm", "leaves", "beach", "leopard", "sunflower"))
-
- +
+

@@ -333,8 +333,8 @@

Pixgallery usage

 pixgallery(paths)
-
- +
+

@@ -459,7 +459,7 @@

Pixgallery usage

h -🟩 +🔵 🟩 🔵 🔴 @@ -530,16 +530,16 @@

Pixgallery usage

 pixgallery(paths_a[1:8], layout = "fixed")
-
- +
+
 pixgallery(paths_a[1:8], layout = "fixed", caption = captions[1:8], caption_valign = "center", caption_halign = "center", border_radius = "50%", gap = "10px")
-
- +
+

@@ -550,24 +550,24 @@

Pixgallery usage

 pixgallery(paths_b, layout = "mosaic")
-
- +
+
 pixgallery(paths_a, layout = "mosaic", caption = captions, caption_valign = "bottom", h = "100px", w = "100px")
-
- +
+
 pixgallery(paths_a, layout = "mosaic", caption = captions, caption_valign = "below", h = "100px", w = "100px", border_radius = "5px", shuffle = TRUE)
-
- +
+

@@ -578,24 +578,24 @@

Pixgallery usage

 pixgallery(paths_b, layout = "masonry")
-
- +
+
 pixgallery(paths_a, layout = "masonry", caption = captions, caption_valign = "bottom", w = "100px")
-
- +
+
 pixgallery(paths_a, layout = "masonry", caption = captions, caption_valign = "below", w = "100px", border_radius = "5px", shuffle = TRUE)
-
- +
+

@@ -606,24 +606,24 @@

Pixgallery usage

 pixgallery(paths_b, layout = "justified")
-
- +
+
 pixgallery(paths_a, layout = "justified", caption = captions, caption_valign = "bottom", h = "100px")
-
- +
+
 pixgallery(paths_a, layout = "justified", caption = captions, caption_valign = "below", h = "100px", border_radius = "5px", shuffle = TRUE)
-
- +
+

@@ -634,24 +634,24 @@

Pixgallery usage

 pixgallery(paths_b, layout = "elastic")
-
- +
+
 pixgallery(paths_a, layout = "elastic", gap = "0", h = "50px")
-
- +
+
 pixgallery(paths_a, layout = "elastic", border_radius = "5px", caption = captions)
-
- +
+

Works better when there are more than a handful of images.

@@ -659,8 +659,8 @@

Pixgallery usage

 pixgallery(paths_a[1:4], layout = "elastic")
-
- +
+

@@ -671,16 +671,16 @@

Pixgallery usage

 pixgallery(paths_b, layout = "rhombus")
-
- +
+
 pixgallery(paths_a, layout = "rhombus", gap = "0px", caption = captions, shuffle = TRUE)
-
- +
+

@@ -704,8 +704,8 @@

Pixgallery usage

 pixgallery(paths, h = "300px")
-
- +
+

@@ -751,7 +751,7 @@

Pixgallery usage

[1] stats graphics grDevices utils datasets methods base other attached packages: -[1] pixture_0.0.2.4000 +[1] pixture_0.0.3 loaded via a namespace (and not attached): [1] digest_0.6.36 later_1.3.2 R6_2.5.1 httpuv_1.6.15 diff --git a/docs/articles/pixgallery_files/libs/pixgallery-binding-0.0.2.4000/pixgallery.js b/docs/articles/pixgallery_files/libs/pixgallery-binding-0.0.3/pixgallery.js similarity index 97% rename from docs/articles/pixgallery_files/libs/pixgallery-binding-0.0.2.4000/pixgallery.js rename to docs/articles/pixgallery_files/libs/pixgallery-binding-0.0.3/pixgallery.js index 8306887..5d0b74d 100644 --- a/docs/articles/pixgallery_files/libs/pixgallery-binding-0.0.2.4000/pixgallery.js +++ b/docs/articles/pixgallery_files/libs/pixgallery-binding-0.0.3/pixgallery.js @@ -95,7 +95,7 @@ function pixgallery_grid(el,x,fixed){ if(fixed) { var temp = '
{caption}
'; } else { - var temp = '
{caption}
'; + var temp = '
{caption}
'; } } else if(captionValign == "center") { @@ -103,7 +103,7 @@ function pixgallery_grid(el,x,fixed){ if(fixed) { var temp = '
{caption}
'; } else { - var temp = '
{caption}
'; + var temp = '
{caption}
'; } } else { @@ -111,7 +111,7 @@ function pixgallery_grid(el,x,fixed){ if(fixed) { var temp = '
{caption}
'; } else { - var temp = '
{caption}
'; + var temp = '
{caption}
'; } } } diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index 4aa04e3..f41892c 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -5,7 +5,7 @@ articles: pixfigure: pixfigure.html pixgallery: pixgallery.html shiny: shiny.html -last_built: 2024-08-01T19:58Z +last_built: 2024-08-01T21:12Z urls: reference: https://github.com/royfrancis/pixture/reference article: https://github.com/royfrancis/pixture/articles diff --git a/docs/reference/libs/pixgallery-binding-0.0.3/pixgallery.js b/docs/reference/libs/pixgallery-binding-0.0.3/pixgallery.js index 8306887..5d0b74d 100644 --- a/docs/reference/libs/pixgallery-binding-0.0.3/pixgallery.js +++ b/docs/reference/libs/pixgallery-binding-0.0.3/pixgallery.js @@ -95,7 +95,7 @@ function pixgallery_grid(el,x,fixed){ if(fixed) { var temp = '
{caption}
'; } else { - var temp = '
{caption}
'; + var temp = '
{caption}
'; } } else if(captionValign == "center") { @@ -103,7 +103,7 @@ function pixgallery_grid(el,x,fixed){ if(fixed) { var temp = '
{caption}
'; } else { - var temp = '
{caption}
'; + var temp = '
{caption}
'; } } else { @@ -111,7 +111,7 @@ function pixgallery_grid(el,x,fixed){ if(fixed) { var temp = '
{caption}
'; } else { - var temp = '
{caption}
'; + var temp = '
{caption}
'; } } } diff --git a/docs/reference/pixfigure.html b/docs/reference/pixfigure.html index dd6ad05..8ed9e3b 100644 --- a/docs/reference/pixfigure.html +++ b/docs/reference/pixfigure.html @@ -109,7 +109,7 @@

Examplespaths <- list.files(path=system.file("extdata/images",package="pixture"),full.names=TRUE) pixfigure(paths)
- +