Skip to content

Commit

Permalink
build: release 1.0.0-beta.2
Browse files Browse the repository at this point in the history
  • Loading branch information
fengyuanchen committed Feb 13, 2018
1 parent a53d506 commit 7fdc137
Show file tree
Hide file tree
Showing 12 changed files with 109 additions and 32 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## 1.0.0-beta.2 (Feb 13, 2018)

- Add a new option: `container`.
- Recover the missing default value of the `interval` option (#133).

## 1.0.0-beta.1 (Dec 23, 2017)

- Add a new option: `backdrop`.
Expand Down
26 changes: 22 additions & 4 deletions dist/viewer.common.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/*!
* Viewer.js v1.0.0-beta.1
* Viewer.js v1.0.0-beta.2
* https://github.com/fengyuanchen/viewerjs
*
* Copyright (c) 2015-2017 Chen Fengyuan
* Copyright (c) 2015-2018 Chen Fengyuan
* Released under the MIT license
*
* Date: 2017-12-23T04:31:53.438Z
* Date: 2018-02-13T13:33:47.607Z
*/

'use strict';
Expand Down Expand Up @@ -47,6 +47,9 @@ var DEFAULTS = {
// Enable to request fullscreen when play
fullscreen: true,

// The amount of time to delay between automatically cycling an image when playing.
interval: 5000,

// Enable keyboard support
keyboard: true,

Expand Down Expand Up @@ -81,6 +84,10 @@ var DEFAULTS = {
// Type: String (an image attribute) or Function (should return an image URL)
url: 'src',

// Define where to put the viewer in modal mode.
// Type: String | Element
container: 'body',

// Filter the images for viewing.
// Type: Function (return true if the image is viewable)
filter: null,
Expand Down Expand Up @@ -2717,7 +2724,18 @@ var Viewer = function () {
zIndex: options.zIndex
});

this.body.appendChild(viewer);
var container = options.container;


if (isString(container)) {
container = document.querySelector(container);
}

if (!container) {
container = this.body;
}

container.appendChild(viewer);
}

if (options.inline) {
Expand Down
6 changes: 3 additions & 3 deletions dist/viewer.css
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/*!
* Viewer.js v1.0.0-beta.1
* Viewer.js v1.0.0-beta.2
* https://github.com/fengyuanchen/viewerjs
*
* Copyright (c) 2015-2017 Chen Fengyuan
* Copyright (c) 2015-2018 Chen Fengyuan
* Released under the MIT license
*
* Date: 2017-12-23T04:31:47.134Z
* Date: 2018-02-13T13:33:39.783Z
*/

.viewer-zoom-in::before,
Expand Down
26 changes: 22 additions & 4 deletions dist/viewer.esm.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/*!
* Viewer.js v1.0.0-beta.1
* Viewer.js v1.0.0-beta.2
* https://github.com/fengyuanchen/viewerjs
*
* Copyright (c) 2015-2017 Chen Fengyuan
* Copyright (c) 2015-2018 Chen Fengyuan
* Released under the MIT license
*
* Date: 2017-12-23T04:31:53.438Z
* Date: 2018-02-13T13:33:47.607Z
*/

var DEFAULTS = {
Expand Down Expand Up @@ -45,6 +45,9 @@ var DEFAULTS = {
// Enable to request fullscreen when play
fullscreen: true,

// The amount of time to delay between automatically cycling an image when playing.
interval: 5000,

// Enable keyboard support
keyboard: true,

Expand Down Expand Up @@ -79,6 +82,10 @@ var DEFAULTS = {
// Type: String (an image attribute) or Function (should return an image URL)
url: 'src',

// Define where to put the viewer in modal mode.
// Type: String | Element
container: 'body',

// Filter the images for viewing.
// Type: Function (return true if the image is viewable)
filter: null,
Expand Down Expand Up @@ -2715,7 +2722,18 @@ var Viewer = function () {
zIndex: options.zIndex
});

this.body.appendChild(viewer);
var container = options.container;


if (isString(container)) {
container = document.querySelector(container);
}

if (!container) {
container = this.body;
}

container.appendChild(viewer);
}

if (options.inline) {
Expand Down
26 changes: 22 additions & 4 deletions dist/viewer.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/*!
* Viewer.js v1.0.0-beta.1
* Viewer.js v1.0.0-beta.2
* https://github.com/fengyuanchen/viewerjs
*
* Copyright (c) 2015-2017 Chen Fengyuan
* Copyright (c) 2015-2018 Chen Fengyuan
* Released under the MIT license
*
* Date: 2017-12-23T04:31:53.438Z
* Date: 2018-02-13T13:33:47.607Z
*/

(function (global, factory) {
Expand Down Expand Up @@ -51,6 +51,9 @@ var DEFAULTS = {
// Enable to request fullscreen when play
fullscreen: true,

// The amount of time to delay between automatically cycling an image when playing.
interval: 5000,

// Enable keyboard support
keyboard: true,

Expand Down Expand Up @@ -85,6 +88,10 @@ var DEFAULTS = {
// Type: String (an image attribute) or Function (should return an image URL)
url: 'src',

// Define where to put the viewer in modal mode.
// Type: String | Element
container: 'body',

// Filter the images for viewing.
// Type: Function (return true if the image is viewable)
filter: null,
Expand Down Expand Up @@ -2721,7 +2728,18 @@ var Viewer = function () {
zIndex: options.zIndex
});

this.body.appendChild(viewer);
var container = options.container;


if (isString(container)) {
container = document.querySelector(container);
}

if (!container) {
container = this.body;
}

container.appendChild(viewer);
}

if (options.inline) {
Expand Down
6 changes: 3 additions & 3 deletions dist/viewer.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions dist/viewer.min.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/css/viewer.css
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/*!
* Viewer.js v1.0.0-beta.1
* Viewer.js v1.0.0-beta.2
* https://github.com/fengyuanchen/viewerjs
*
* Copyright (c) 2015-2017 Chen Fengyuan
* Copyright (c) 2015-2018 Chen Fengyuan
* Released under the MIT license
*
* Date: 2017-12-23T04:31:47.134Z
* Date: 2018-02-13T13:33:39.783Z
*/

.viewer-zoom-in::before,
Expand Down
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
<div class="container">
<div class="row">
<div class="col-md">
<h1>Viewer.js <small class="h6">v1.0.0-beta.1</small></h1>
<h1>Viewer.js <small class="h6">v1.0.0-beta.2</small></h1>
<p class="lead">JavaScript image viewer.</p>
</div>
<div class="col-md">
Expand Down
26 changes: 22 additions & 4 deletions docs/js/viewer.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/*!
* Viewer.js v1.0.0-beta.1
* Viewer.js v1.0.0-beta.2
* https://github.com/fengyuanchen/viewerjs
*
* Copyright (c) 2015-2017 Chen Fengyuan
* Copyright (c) 2015-2018 Chen Fengyuan
* Released under the MIT license
*
* Date: 2017-12-23T04:31:53.438Z
* Date: 2018-02-13T13:33:47.607Z
*/

(function (global, factory) {
Expand Down Expand Up @@ -51,6 +51,9 @@ var DEFAULTS = {
// Enable to request fullscreen when play
fullscreen: true,

// The amount of time to delay between automatically cycling an image when playing.
interval: 5000,

// Enable keyboard support
keyboard: true,

Expand Down Expand Up @@ -85,6 +88,10 @@ var DEFAULTS = {
// Type: String (an image attribute) or Function (should return an image URL)
url: 'src',

// Define where to put the viewer in modal mode.
// Type: String | Element
container: 'body',

// Filter the images for viewing.
// Type: Function (return true if the image is viewable)
filter: null,
Expand Down Expand Up @@ -2721,7 +2728,18 @@ var Viewer = function () {
zIndex: options.zIndex
});

this.body.appendChild(viewer);
var container = options.container;


if (isString(container)) {
container = document.querySelector(container);
}

if (!container) {
container = this.body;
}

container.appendChild(viewer);
}

if (options.inline) {
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "viewerjs",
"description": "JavaScript image viewer.",
"version": "1.0.0-beta.1",
"version": "1.0.0-beta.2",
"main": "dist/viewer.common.js",
"module": "dist/viewer.esm.js",
"browser": "dist/viewer.js",
Expand Down

0 comments on commit 7fdc137

Please sign in to comment.