digital editions gallery

Usage no npm install needed!

<script type="module">
  import cnbritainWcDigitaleditionsBbcodeGallery from 'https://cdn.skypack.dev/@cnbritain/wc-digitaleditions-bbcode-gallery';



digital editions gallery

Macro settings

Key Optional Default Description
Example arg false

JS Documentation


Digital Editions BBCode gallery

@cnbritain/wc-digitaleditions-bbcode-gallery.mapImagesToPswp(imgTuple, i, arr) ⇒ Object

map function to transform Merlin list of image 2-tuples to Photoswipe array of images (only takes the 2nd value in the tuple)

Kind: static method of @cnbritain/wc-digitaleditions-bbcode-gallery
Returns: Object - item object (http://photoswipe.com/documentation/getting-started.html)

Param Type Description
imgTuple Array 2-tuple containing images
i Number array index
arr Array array


Kind: inner class of @cnbritain/wc-digitaleditions-bbcode-gallery

new GalleryManager()

Interface for Photoswipe gallery implementation

@cnbritain/wc-digitaleditions-bbcode-gallery~init(selectorGalleryThumbs, options) ⇒ void


Kind: inner method of @cnbritain/wc-digitaleditions-bbcode-gallery

Param Type Description
selectorGalleryThumbs String selector
options Object Photoswipe options (http://photoswipe.com/documentation/options.html)

@cnbritain/wc-digitaleditions-bbcode-gallery~displayGallery(e) ⇒ void

display the PhotoSwipe gallery

Kind: inner method of @cnbritain/wc-digitaleditions-bbcode-gallery

Param Type Description
e Object display event



  • Node.jsbrew install node
  • Grunt - npm install -g grunt-cli
  • Other prereqs? Python? Virtualenv?


Install dependencies:

npm install

Build the things:

npm run sass
npm run js
npm run docs

Hint your JS

npm run jshint

Python the pythons:

npm run demo-install

Start the demo server:

python demo.py