Skip to content

Commit 87652d4

Browse files
committed
Bump v0.14.28-rc.2-touch
1 parent 5eae4aa commit 87652d4

File tree

4 files changed

+27
-15
lines changed

4 files changed

+27
-15
lines changed

dist/grapes.js

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -32044,7 +32044,11 @@ var Component = Backbone.Model.extend(_Styleable2.default).extend({
3204432044
* @private
3204532045
*/
3204632046
initToolbar: function initToolbar() {
32047+
var em = this.em;
32048+
3204732049
var model = this;
32050+
var ppfx = em && em.getConfig('stylePrefix') || '';
32051+
3204832052
if (!model.get('toolbar')) {
3204932053
var tb = [];
3205032054
if (model.collection) {
@@ -32055,7 +32059,10 @@ var Component = Backbone.Model.extend(_Styleable2.default).extend({
3205532059
}
3205632060
if (model.get('draggable')) {
3205732061
tb.push({
32058-
attributes: { class: 'fa fa-arrows', draggable: true },
32062+
attributes: {
32063+
class: 'fa fa-arrows ' + ppfx + 'no-touch-actions',
32064+
draggable: true
32065+
},
3205932066
//events: hasDnd(this.em) ? { dragstart: 'execCommand' } : '',
3206032067
command: 'tlb-move'
3206132068
});
@@ -37684,7 +37691,7 @@ module.exports = function () {
3768437691
plugins: plugins,
3768537692

3768637693
// Will be replaced on build
37687-
version: '0.14.27',
37694+
version: '0.14.28-rc.2-touch',
3768837695

3768937696
/**
3769037697
* Initializes an editor based on passed options
@@ -37718,7 +37725,7 @@ module.exports = function () {
3771837725
// Try to search in global context
3771937726
if (!plugin) {
3772037727
var wplg = window[pluginId];
37721-
plugin = wplg && wplg.defaults ? wplg.defaults : wplg;
37728+
plugin = wplg && wplg.default ? wplg.default : wplg;
3772237729
}
3772337730

3772437731
if (plugin) {
@@ -38554,6 +38561,7 @@ var ItemsView = void 0;
3855438561
module.exports = _backbone2.default.View.extend({
3855538562
events: {
3855638563
'mousedown [data-toggle-move]': 'startSort',
38564+
'touchstart [data-toggle-move]': 'startSort',
3855738565
'click [data-toggle-visible]': 'toggleVisibility',
3855838566
'click [data-toggle-select]': 'handleSelect',
3855938567
'mouseover [data-toggle-select]': 'handleHover',
@@ -38762,7 +38770,7 @@ module.exports = _backbone2.default.View.extend({
3876238770
e.stopPropagation();
3876338771
var sorter = this.sorter;
3876438772
// Right or middel click
38765-
if (e.button !== 0) return;
38773+
if (e.button && e.button !== 0) return;
3876638774
sorter && sorter.startSort(e.target);
3876738775
},
3876838776

@@ -44897,14 +44905,17 @@ module.exports = _backbone2.default.View.extend({
4489744905
events: {
4489844906
click: 'active',
4489944907
'click [data-close-layer]': 'remove',
44900-
'mousedown [data-move-layer]': 'initSorter'
44908+
'mousedown [data-move-layer]': 'initSorter',
44909+
'touchstart [data-move-layer]': 'initSorter'
4490144910
},
4490244911

4490344912
template: function template(model) {
44904-
var pfx = this.pfx;
44913+
var pfx = this.pfx,
44914+
ppfx = this.ppfx;
44915+
4490544916
var label = 'Layer ' + model.get('index');
4490644917

44907-
return '\n <div id="' + pfx + 'move" data-move-layer>\n <i class="fa fa-arrows"></i>\n </div>\n <div id="' + pfx + 'label">' + label + '</div>\n <div id="' + pfx + 'preview-box">\n \t<div id="' + pfx + 'preview" data-preview></div>\n </div>\n <div id="' + pfx + 'close-layer" class="' + pfx + 'btn-close" data-close-layer>\n &Cross;\n </div>\n <div id="' + pfx + 'inputs" data-properties></div>\n <div style="clear:both"></div>\n ';
44918+
return '\n <div id="' + pfx + 'move" class="' + ppfx + 'no-touch-actions" data-move-layer>\n <i class="fa fa-arrows"></i>\n </div>\n <div id="' + pfx + 'label">' + label + '</div>\n <div id="' + pfx + 'preview-box">\n \t<div id="' + pfx + 'preview" data-preview></div>\n </div>\n <div id="' + pfx + 'close-layer" class="' + pfx + 'btn-close" data-close-layer>\n &Cross;\n </div>\n <div id="' + pfx + 'inputs" data-properties></div>\n <div style="clear:both"></div>\n ';
4490844919
},
4490944920
initialize: function initialize() {
4491044921
var o = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
@@ -44913,6 +44924,7 @@ module.exports = _backbone2.default.View.extend({
4491344924
this.stackModel = o.stackModel || {};
4491444925
this.config = o.config || {};
4491544926
this.pfx = this.config.stylePrefix || '';
44927+
this.ppfx = this.config.pStylePrefix || '';
4491644928
this.sorter = o.sorter || null;
4491744929
this.propsConfig = o.propsConfig || {};
4491844930
this.customPreview = o.onPreview;
@@ -48994,7 +49006,7 @@ exports.default = function ($, undefined) {
4899449006
return stop();
4899549007
}
4899649008

48997-
var t0 = e.originalEvent && e.originalEvent.touches && e.originalEvent.touches[0];
49009+
var t0 = e && e.touches && e.touches[0];
4899849010
var pageX = t0 && t0.pageX || e.pageX;
4899949011
var pageY = t0 && t0.pageY || e.pageY;
4900049012

@@ -50720,7 +50732,7 @@ var Droppable = function () {
5072050732
value: function getContentByData(dataTransfer) {
5072150733
var em = this.em;
5072250734
var types = dataTransfer.types;
50723-
var files = dataTransfer.files;
50735+
var files = dataTransfer.files || [];
5072450736
var dragContent = em.get('dragContent');
5072550737
var content = dataTransfer.getData('text');
5072650738

@@ -51642,7 +51654,7 @@ module.exports = _backbone2.default.View.extend({
5164251654
}
5164351655

5164451656
(0, _mixins.on)(container, 'mousemove dragover', this.onMove);
51645-
(0, _mixins.on)(docs, 'mouseup dragend', this.endMove);
51657+
(0, _mixins.on)(docs, 'mouseup dragend touchend', this.endMove);
5164651658
(0, _mixins.on)(docs, 'keydown', this.rollback);
5164751659
onStart && onStart();
5164851660

@@ -52278,7 +52290,7 @@ module.exports = _backbone2.default.View.extend({
5227852290
lastPos = this.lastPos;
5227952291

5228052292
(0, _mixins.off)(container, 'mousemove dragover', this.onMove);
52281-
(0, _mixins.off)(docs, 'mouseup dragend', this.endMove);
52293+
(0, _mixins.off)(docs, 'mouseup dragend touchend', this.endMove);
5228252294
(0, _mixins.off)(docs, 'keydown', this.rollback);
5228352295
//this.$document.off('mouseup', this.endMove);
5228452296
//this.$document.off('keydown', this.rollback);

dist/grapes.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/grapes.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "grapesjs",
33
"description": "Free and Open Source Web Builder Framework",
4-
"version": "0.14.27",
4+
"version": "0.14.28-rc.2-touch",
55
"author": "Artur Arseniev",
66
"license": "BSD-3-Clause",
77
"homepage": "http://grapesjs.com",

0 commit comments

Comments
 (0)