1
0
mirror of https://github.com/webslides/WebSlides.git synced 2025-08-18 02:41:37 +02:00

Changing zoom structure, now webslides-zoom > wrap > grid > colunms

This commit is contained in:
Luis
2017-05-05 19:29:36 +02:00
parent bc3d1a9fa0
commit 218c67a435
3 changed files with 21 additions and 9 deletions

View File

@@ -5,7 +5,8 @@ import Slide from '../modules/slide';
const CLASSES = {
ZOOM: 'grid',
DIV: 'column',
WRAP: 'wrap-zoom'
WRAP: 'wrap-zoom',
WRAP_CONTAINER: 'wrap'
};
const ID = 'webslides-zoomed';
@@ -63,7 +64,12 @@ export default class Zoom {
// Clone #webslides element
this.zws_.el = this.ws_.el.cloneNode();
this.zws_.el.id = ID;
this.zws_.el.className = CLASSES.ZOOM;
this.zws_.wrap = DOM.createNode('div');
this.zws_.wrap.className = CLASSES.WRAP_CONTAINER;
this.zws_.el.appendChild(this.zws_.wrap);
this.zws_.grid = DOM.createNode('div');
this.zws_.grid.className = CLASSES.ZOOM;
this.zws_.wrap.appendChild(this.zws_.grid);
this.zws_.el.addEventListener('click', () => this.toggleZoom());
@@ -71,7 +77,7 @@ export default class Zoom {
this.zws_.slides = [].map.call(this.ws_.slides,
(slide, i) => {
const s_ = slide.el.cloneNode(true);
this.zws_.el.appendChild(s_);
this.zws_.grid.appendChild(s_);
return new Slide(s_, i);
});
DOM.hide(this.zws_.el);

View File

@@ -1,7 +1,7 @@
/*!
* Name: WebSlides
* Version: 1.3.1
* Date: 2017-05-01
* Date: 2017-05-05
* Description: Making HTML presentations easy
* URL: https://github.com/webslides/webslides#readme
* Credits: @jlantunez, @LuisSacristan, @Belelros
@@ -2681,7 +2681,8 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
var CLASSES = {
ZOOM: 'grid',
DIV: 'column',
WRAP: 'wrap-zoom'
WRAP: 'wrap-zoom',
WRAP_CONTAINER: 'wrap'
};
var ID = 'webslides-zoomed';
@@ -2750,7 +2751,12 @@ var Zoom = function () {
// Clone #webslides element
this.zws_.el = this.ws_.el.cloneNode();
this.zws_.el.id = ID;
this.zws_.el.className = CLASSES.ZOOM;
this.zws_.wrap = __WEBPACK_IMPORTED_MODULE_0__utils_dom__["a" /* default */].createNode('div');
this.zws_.wrap.className = CLASSES.WRAP_CONTAINER;
this.zws_.el.appendChild(this.zws_.wrap);
this.zws_.grid = __WEBPACK_IMPORTED_MODULE_0__utils_dom__["a" /* default */].createNode('div');
this.zws_.grid.className = CLASSES.ZOOM;
this.zws_.wrap.appendChild(this.zws_.grid);
this.zws_.el.addEventListener('click', function () {
return _this.toggleZoom();
@@ -2759,7 +2765,7 @@ var Zoom = function () {
// Clone the slides
this.zws_.slides = [].map.call(this.ws_.slides, function (slide, i) {
var s_ = slide.el.cloneNode(true);
_this.zws_.el.appendChild(s_);
_this.zws_.grid.appendChild(s_);
return new __WEBPACK_IMPORTED_MODULE_2__modules_slide__["a" /* default */](s_, i);
});
__WEBPACK_IMPORTED_MODULE_0__utils_dom__["a" /* default */].hide(this.zws_.el);

File diff suppressed because one or more lines are too long