@@ -32044,7 +32044,11 @@ var Component = Backbone.Model.extend(_Styleable2.default).extend({
32044
32044
* @private
32045
32045
*/
32046
32046
initToolbar: function initToolbar() {
32047
+ var em = this.em;
32048
+
32047
32049
var model = this;
32050
+ var ppfx = em && em.getConfig('stylePrefix') || '';
32051
+
32048
32052
if (!model.get('toolbar')) {
32049
32053
var tb = [];
32050
32054
if (model.collection) {
@@ -32055,7 +32059,10 @@ var Component = Backbone.Model.extend(_Styleable2.default).extend({
32055
32059
}
32056
32060
if (model.get('draggable')) {
32057
32061
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
+ },
32059
32066
//events: hasDnd(this.em) ? { dragstart: 'execCommand' } : '',
32060
32067
command: 'tlb-move'
32061
32068
});
@@ -37684,7 +37691,7 @@ module.exports = function () {
37684
37691
plugins: plugins,
37685
37692
37686
37693
// Will be replaced on build
37687
- version: '0.14.27 ',
37694
+ version: '0.14.28-rc.2-touch ',
37688
37695
37689
37696
/**
37690
37697
* Initializes an editor based on passed options
@@ -37718,7 +37725,7 @@ module.exports = function () {
37718
37725
// Try to search in global context
37719
37726
if (!plugin) {
37720
37727
var wplg = window[pluginId];
37721
- plugin = wplg && wplg.defaults ? wplg.defaults : wplg;
37728
+ plugin = wplg && wplg.default ? wplg.default : wplg;
37722
37729
}
37723
37730
37724
37731
if (plugin) {
@@ -38554,6 +38561,7 @@ var ItemsView = void 0;
38554
38561
module.exports = _backbone2.default.View.extend({
38555
38562
events: {
38556
38563
'mousedown [data-toggle-move]': 'startSort',
38564
+ 'touchstart [data-toggle-move]': 'startSort',
38557
38565
'click [data-toggle-visible]': 'toggleVisibility',
38558
38566
'click [data-toggle-select]': 'handleSelect',
38559
38567
'mouseover [data-toggle-select]': 'handleHover',
@@ -38762,7 +38770,7 @@ module.exports = _backbone2.default.View.extend({
38762
38770
e.stopPropagation();
38763
38771
var sorter = this.sorter;
38764
38772
// Right or middel click
38765
- if (e.button !== 0) return;
38773
+ if (e.button && e.button !== 0) return;
38766
38774
sorter && sorter.startSort(e.target);
38767
38775
},
38768
38776
@@ -44897,14 +44905,17 @@ module.exports = _backbone2.default.View.extend({
44897
44905
events: {
44898
44906
click: 'active',
44899
44907
'click [data-close-layer]': 'remove',
44900
- 'mousedown [data-move-layer]': 'initSorter'
44908
+ 'mousedown [data-move-layer]': 'initSorter',
44909
+ 'touchstart [data-move-layer]': 'initSorter'
44901
44910
},
44902
44911
44903
44912
template: function template(model) {
44904
- var pfx = this.pfx;
44913
+ var pfx = this.pfx,
44914
+ ppfx = this.ppfx;
44915
+
44905
44916
var label = 'Layer ' + model.get('index');
44906
44917
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 ⨯\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 ⨯\n </div>\n <div id="' + pfx + 'inputs" data-properties></div>\n <div style="clear:both"></div>\n ';
44908
44919
},
44909
44920
initialize: function initialize() {
44910
44921
var o = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
@@ -44913,6 +44924,7 @@ module.exports = _backbone2.default.View.extend({
44913
44924
this.stackModel = o.stackModel || {};
44914
44925
this.config = o.config || {};
44915
44926
this.pfx = this.config.stylePrefix || '';
44927
+ this.ppfx = this.config.pStylePrefix || '';
44916
44928
this.sorter = o.sorter || null;
44917
44929
this.propsConfig = o.propsConfig || {};
44918
44930
this.customPreview = o.onPreview;
@@ -48994,7 +49006,7 @@ exports.default = function ($, undefined) {
48994
49006
return stop();
48995
49007
}
48996
49008
48997
- var t0 = e.originalEvent && e.originalEvent. touches && e.originalEvent .touches[0];
49009
+ var t0 = e && e.touches && e.touches[0];
48998
49010
var pageX = t0 && t0.pageX || e.pageX;
48999
49011
var pageY = t0 && t0.pageY || e.pageY;
49000
49012
@@ -50720,7 +50732,7 @@ var Droppable = function () {
50720
50732
value: function getContentByData(dataTransfer) {
50721
50733
var em = this.em;
50722
50734
var types = dataTransfer.types;
50723
- var files = dataTransfer.files;
50735
+ var files = dataTransfer.files || [] ;
50724
50736
var dragContent = em.get('dragContent');
50725
50737
var content = dataTransfer.getData('text');
50726
50738
@@ -51642,7 +51654,7 @@ module.exports = _backbone2.default.View.extend({
51642
51654
}
51643
51655
51644
51656
(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);
51646
51658
(0, _mixins.on)(docs, 'keydown', this.rollback);
51647
51659
onStart && onStart();
51648
51660
@@ -52278,7 +52290,7 @@ module.exports = _backbone2.default.View.extend({
52278
52290
lastPos = this.lastPos;
52279
52291
52280
52292
(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);
52282
52294
(0, _mixins.off)(docs, 'keydown', this.rollback);
52283
52295
//this.$document.off('mouseup', this.endMove);
52284
52296
//this.$document.off('keydown', this.rollback);
0 commit comments