|
|
|
@ -24604,7 +24604,8 @@ module.exports = function () { |
|
|
|
* @return {HTMLBodyElement} |
|
|
|
*/ |
|
|
|
getBody: function getBody() { |
|
|
|
return this.getDocument().body; |
|
|
|
var doc = this.getDocument(); |
|
|
|
return doc && doc.body; |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
@ -24613,7 +24614,8 @@ module.exports = function () { |
|
|
|
* @return {HTMLElement} |
|
|
|
*/ |
|
|
|
getWrapperEl: function getWrapperEl() { |
|
|
|
return this.getBody().querySelector('#wrapper'); |
|
|
|
var body = this.getBody(); |
|
|
|
return body && body.querySelector('#wrapper'); |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
@ -25873,6 +25875,8 @@ module.exports = _backbone2.default.Model.extend({ |
|
|
|
|
|
|
|
var _underscore = __webpack_require__(/*! underscore */ "./node_modules/underscore/underscore.js"); |
|
|
|
|
|
|
|
var maxValue = Number.MAX_VALUE; |
|
|
|
|
|
|
|
module.exports = __webpack_require__(/*! backbone */ "./node_modules/backbone/backbone.js").Model.extend({ |
|
|
|
initialize: function initialize() { |
|
|
|
this.compCls = []; |
|
|
|
@ -25930,54 +25934,47 @@ module.exports = __webpack_require__(/*! backbone */ "./node_modules/backbone/ba |
|
|
|
var clearStyles = (0, _underscore.isUndefined)(opts.clearStyles) && em ? em.getConfig('clearStyles') : opts.clearStyles; |
|
|
|
|
|
|
|
if (cssc) { |
|
|
|
(function () { |
|
|
|
var rules = cssc.getAll(); |
|
|
|
var atRules = {}; |
|
|
|
var dump = []; |
|
|
|
|
|
|
|
rules.each(function (rule) { |
|
|
|
var atRule = rule.getAtRule(); |
|
|
|
|
|
|
|
if (atRule) { |
|
|
|
var mRules = atRules[atRule]; |
|
|
|
if (mRules) { |
|
|
|
mRules.push(rule); |
|
|
|
} else { |
|
|
|
atRules[atRule] = [rule]; |
|
|
|
} |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
code += _this2.buildFromRule(rule, dump, opts); |
|
|
|
}); |
|
|
|
var rules = cssc.getAll(); |
|
|
|
var atRules = {}; |
|
|
|
var dump = []; |
|
|
|
|
|
|
|
// Get at-rules
|
|
|
|
rules.each(function (rule) { |
|
|
|
var atRule = rule.getAtRule(); |
|
|
|
|
|
|
|
var _loop = function _loop(atRule) { |
|
|
|
var rulesStr = ''; |
|
|
|
if (atRule) { |
|
|
|
var mRules = atRules[atRule]; |
|
|
|
if (mRules) { |
|
|
|
mRules.push(rule); |
|
|
|
} else { |
|
|
|
atRules[atRule] = [rule]; |
|
|
|
} |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
mRules.forEach(function (rule) { |
|
|
|
var ruleStr = _this2.buildFromRule(rule, dump, opts); |
|
|
|
code += _this2.buildFromRule(rule, dump, opts); |
|
|
|
}); |
|
|
|
|
|
|
|
if (rule.get('singleAtRule')) { |
|
|
|
code += atRule + '{' + ruleStr + '}'; |
|
|
|
} else { |
|
|
|
rulesStr += ruleStr; |
|
|
|
} |
|
|
|
}); |
|
|
|
this.sortMediaObject(atRules).forEach(function (item) { |
|
|
|
var rulesStr = ''; |
|
|
|
var atRule = item.key; |
|
|
|
var mRules = item.value; |
|
|
|
|
|
|
|
mRules.forEach(function (rule) { |
|
|
|
var ruleStr = _this2.buildFromRule(rule, dump, opts); |
|
|
|
|
|
|
|
if (rulesStr) { |
|
|
|
code += atRule + '{' + rulesStr + '}'; |
|
|
|
if (rule.get('singleAtRule')) { |
|
|
|
code += atRule + '{' + ruleStr + '}'; |
|
|
|
} else { |
|
|
|
rulesStr += ruleStr; |
|
|
|
} |
|
|
|
}; |
|
|
|
}); |
|
|
|
|
|
|
|
for (var atRule in atRules) { |
|
|
|
_loop(atRule); |
|
|
|
if (rulesStr) { |
|
|
|
code += atRule + '{' + rulesStr + '}'; |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
em && clearStyles && rules.remove(dump); |
|
|
|
})(); |
|
|
|
em && clearStyles && rules.remove(dump); |
|
|
|
} |
|
|
|
|
|
|
|
return code; |
|
|
|
@ -26016,6 +26013,40 @@ module.exports = __webpack_require__(/*! backbone */ "./node_modules/backbone/ba |
|
|
|
} |
|
|
|
|
|
|
|
return result; |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
* Get the numeric length of the media query string |
|
|
|
* @param {String} mediaQuery Media query string |
|
|
|
* @return {Number} |
|
|
|
*/ |
|
|
|
getQueryLength: function getQueryLength(mediaQuery) { |
|
|
|
var length = /(-?\d*\.?\d+)\w{0,}/.exec(mediaQuery); |
|
|
|
if (!length) return maxValue; |
|
|
|
|
|
|
|
return parseFloat(length[1]); |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
* Return a sorted array from media query object |
|
|
|
* @param {Object} items |
|
|
|
* @return {Array} |
|
|
|
*/ |
|
|
|
sortMediaObject: function sortMediaObject() { |
|
|
|
var _this4 = this; |
|
|
|
|
|
|
|
var items = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; |
|
|
|
|
|
|
|
var result = {}; |
|
|
|
var itemsArr = []; |
|
|
|
(0, _underscore.each)(items, function (value, key) { |
|
|
|
return itemsArr.push({ key: key, value: value }); |
|
|
|
}); |
|
|
|
return itemsArr.sort(function (a, b) { |
|
|
|
return _this4.getQueryLength(b.key) - _this4.getQueryLength(a.key); |
|
|
|
}); |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
@ -30496,9 +30527,8 @@ var CssRuleView = __webpack_require__(/*! ./CssRuleView */ "./src/css_composer/v |
|
|
|
var CssGroupRuleView = __webpack_require__(/*! ./CssGroupRuleView */ "./src/css_composer/view/CssGroupRuleView.js"); |
|
|
|
var $ = _backbone2.default.$; |
|
|
|
|
|
|
|
// % is not a valid character for classes
|
|
|
|
var getBlockId = function getBlockId(pfx, widthMedia) { |
|
|
|
return '' + pfx + (widthMedia ? '-' + widthMedia.replace('%', 'pc') : ''); |
|
|
|
var getBlockId = function getBlockId(pfx, order) { |
|
|
|
return '' + pfx + (order ? '-' + parseFloat(order) : ''); |
|
|
|
}; |
|
|
|
|
|
|
|
module.exports = _backbone2.default.View.extend({ |
|
|
|
@ -30613,12 +30643,8 @@ module.exports = _backbone2.default.View.extend({ |
|
|
|
$el.empty(); |
|
|
|
|
|
|
|
// Create devices related DOM structure
|
|
|
|
this.em.get('DeviceManager').getAll().map(function (model) { |
|
|
|
return model.get('widthMedia'); |
|
|
|
}).sort(function (left, right) { |
|
|
|
return (right && right.replace('px', '') || Number.MAX_VALUE) - (left && left.replace('px', '') || Number.MAX_VALUE); |
|
|
|
}).forEach(function (widthMedia) { |
|
|
|
$('<div id="' + getBlockId(className, widthMedia) + '"></div>').appendTo(frag); |
|
|
|
this.em.get('DeviceManager').getAll().pluck('priority').forEach(function (priority) { |
|
|
|
$('<div id="' + getBlockId(className, priority) + '"></div>').appendTo(frag); |
|
|
|
}); |
|
|
|
|
|
|
|
this.collection.each(function (model) { |
|
|
|
@ -30819,13 +30845,20 @@ module.exports = _backbone2.default.Model.extend({ |
|
|
|
|
|
|
|
// The width which will be used in media queries,
|
|
|
|
// If empty the width will be used
|
|
|
|
widthMedia: null |
|
|
|
widthMedia: null, |
|
|
|
|
|
|
|
// Setup the order of media queries
|
|
|
|
priority: null |
|
|
|
}, |
|
|
|
|
|
|
|
initialize: function initialize() { |
|
|
|
if (this.get('widthMedia') == null) { |
|
|
|
this.set('widthMedia', this.get('width')); |
|
|
|
} |
|
|
|
|
|
|
|
if (!this.get('priority')) { |
|
|
|
this.set('priority', parseFloat(this.get('widthMedia')) || 0); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
@ -30850,7 +30883,16 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de |
|
|
|
var Device = __webpack_require__(/*! ./Device */ "./src/device_manager/model/Device.js"); |
|
|
|
|
|
|
|
module.exports = _backbone2.default.Collection.extend({ |
|
|
|
model: Device |
|
|
|
model: Device, |
|
|
|
|
|
|
|
comparator: function comparator(left, right) { |
|
|
|
var max = Number.MAX_VALUE; |
|
|
|
return (right.get('priority') || max) - (left.get('priority') || max); |
|
|
|
}, |
|
|
|
|
|
|
|
getSorted: function getSorted() { |
|
|
|
return this.sort(); |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
/***/ }), |
|
|
|
@ -31807,6 +31849,10 @@ var Component = Backbone.Model.extend(_Styleable2.default).extend({ |
|
|
|
}); |
|
|
|
}); |
|
|
|
this.init(); |
|
|
|
|
|
|
|
if (em) { |
|
|
|
em.trigger('component:create', this); |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
@ -32560,8 +32606,8 @@ var Component = Backbone.Model.extend(_Styleable2.default).extend({ |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
* Get the DOM element of the component. This works only of the |
|
|
|
* component is already rendered |
|
|
|
* Get the DOM element of the component. |
|
|
|
* This works only if the component is already rendered |
|
|
|
* @return {HTMLElement} |
|
|
|
*/ |
|
|
|
getEl: function getEl() { |
|
|
|
@ -32569,6 +32615,16 @@ var Component = Backbone.Model.extend(_Styleable2.default).extend({ |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
* Get the View of the component. |
|
|
|
* This works only if the component is already rendered |
|
|
|
* @return {ComponentView} |
|
|
|
*/ |
|
|
|
getView: function getView() { |
|
|
|
return this.view; |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
* Return script in string format, cleans 'function() {..' from scripts |
|
|
|
* if it's a function |
|
|
|
@ -33997,7 +34053,7 @@ module.exports = ComponentView.extend({ |
|
|
|
tagName: 'img', |
|
|
|
|
|
|
|
events: { |
|
|
|
dblclick: 'openModal', |
|
|
|
dblclick: 'onActive', |
|
|
|
click: 'initResize' |
|
|
|
}, |
|
|
|
|
|
|
|
@ -34005,7 +34061,6 @@ module.exports = ComponentView.extend({ |
|
|
|
var model = this.model; |
|
|
|
ComponentView.prototype.initialize.apply(this, arguments); |
|
|
|
this.listenTo(model, 'change:src', this.updateSrc); |
|
|
|
this.listenTo(model, 'dblclick active', this.openModal); |
|
|
|
this.classEmpty = this.ppfx + 'plh-image'; |
|
|
|
var config = this.config; |
|
|
|
config.modal && (this.modal = config.modal); |
|
|
|
@ -34055,7 +34110,8 @@ module.exports = ComponentView.extend({ |
|
|
|
* @param {Object} e Event |
|
|
|
* @private |
|
|
|
* */ |
|
|
|
openModal: function openModal(e) { |
|
|
|
onActive: function onActive(ev) { |
|
|
|
ev && ev.stopPropagation(); |
|
|
|
var em = this.opts.config.em; |
|
|
|
var editor = em ? em.get('Editor') : ''; |
|
|
|
|
|
|
|
@ -34072,14 +34128,16 @@ module.exports = ComponentView.extend({ |
|
|
|
} |
|
|
|
}, |
|
|
|
render: function render() { |
|
|
|
this.updateAttributes(); |
|
|
|
this.updateClasses(); |
|
|
|
this.renderAttributes(); |
|
|
|
var $el = this.$el, |
|
|
|
model = this.model; |
|
|
|
|
|
|
|
var actCls = this.$el.attr('class') || ''; |
|
|
|
if (!this.model.get('src')) this.$el.attr('class', (actCls + ' ' + this.classEmpty).trim()); |
|
|
|
var cls = $el.attr('class') || ''; |
|
|
|
!model.get('src') && $el.attr('class', (cls + ' ' + this.classEmpty).trim()); |
|
|
|
// Avoid strange behaviours with drag and drop
|
|
|
|
$el.attr('onmousedown', 'return false'); |
|
|
|
this.postRender(); |
|
|
|
|
|
|
|
// Avoid strange behaviours while try to drag
|
|
|
|
this.$el.attr('onmousedown', 'return false'); |
|
|
|
return this; |
|
|
|
} |
|
|
|
}); |
|
|
|
@ -34263,10 +34321,7 @@ module.exports = ComponentView.extend({ |
|
|
|
"use strict"; |
|
|
|
|
|
|
|
|
|
|
|
var Backbone = __webpack_require__(/*! backbone */ "./node_modules/backbone/backbone.js"); |
|
|
|
var ComponentView = __webpack_require__(/*! ./ComponentView */ "./src/dom_components/view/ComponentView.js"); |
|
|
|
|
|
|
|
module.exports = ComponentView.extend({}); |
|
|
|
module.exports = __webpack_require__(/*! ./ComponentView */ "./src/dom_components/view/ComponentView.js").extend({}); |
|
|
|
|
|
|
|
/***/ }), |
|
|
|
|
|
|
|
@ -34280,10 +34335,7 @@ module.exports = ComponentView.extend({}); |
|
|
|
"use strict"; |
|
|
|
|
|
|
|
|
|
|
|
var Backbone = __webpack_require__(/*! backbone */ "./node_modules/backbone/backbone.js"); |
|
|
|
var ComponentView = __webpack_require__(/*! ./ComponentView */ "./src/dom_components/view/ComponentView.js"); |
|
|
|
|
|
|
|
module.exports = ComponentView.extend({}); |
|
|
|
module.exports = __webpack_require__(/*! ./ComponentView */ "./src/dom_components/view/ComponentView.js").extend({}); |
|
|
|
|
|
|
|
/***/ }), |
|
|
|
|
|
|
|
@ -34297,10 +34349,7 @@ module.exports = ComponentView.extend({}); |
|
|
|
"use strict"; |
|
|
|
|
|
|
|
|
|
|
|
var Backbone = __webpack_require__(/*! backbone */ "./node_modules/backbone/backbone.js"); |
|
|
|
var ComponentView = __webpack_require__(/*! ./ComponentView */ "./src/dom_components/view/ComponentView.js"); |
|
|
|
|
|
|
|
module.exports = ComponentView.extend({}); |
|
|
|
module.exports = __webpack_require__(/*! ./ComponentView */ "./src/dom_components/view/ComponentView.js").extend({}); |
|
|
|
|
|
|
|
/***/ }), |
|
|
|
|
|
|
|
@ -34314,10 +34363,7 @@ module.exports = ComponentView.extend({}); |
|
|
|
"use strict"; |
|
|
|
|
|
|
|
|
|
|
|
var Backbone = __webpack_require__(/*! backbone */ "./node_modules/backbone/backbone.js"); |
|
|
|
var ComponentView = __webpack_require__(/*! ./ComponentView */ "./src/dom_components/view/ComponentView.js"); |
|
|
|
|
|
|
|
module.exports = ComponentView.extend({}); |
|
|
|
module.exports = __webpack_require__(/*! ./ComponentView */ "./src/dom_components/view/ComponentView.js").extend({}); |
|
|
|
|
|
|
|
/***/ }), |
|
|
|
|
|
|
|
@ -34331,10 +34377,7 @@ module.exports = ComponentView.extend({}); |
|
|
|
"use strict"; |
|
|
|
|
|
|
|
|
|
|
|
var Backbone = __webpack_require__(/*! backbone */ "./node_modules/backbone/backbone.js"); |
|
|
|
var ComponentView = __webpack_require__(/*! ./ComponentView */ "./src/dom_components/view/ComponentView.js"); |
|
|
|
|
|
|
|
module.exports = ComponentView.extend({}); |
|
|
|
module.exports = __webpack_require__(/*! ./ComponentView */ "./src/dom_components/view/ComponentView.js").extend({}); |
|
|
|
|
|
|
|
/***/ }), |
|
|
|
|
|
|
|
@ -34348,10 +34391,7 @@ module.exports = ComponentView.extend({}); |
|
|
|
"use strict"; |
|
|
|
|
|
|
|
|
|
|
|
var Backbone = __webpack_require__(/*! backbone */ "./node_modules/backbone/backbone.js"); |
|
|
|
var ComponentView = __webpack_require__(/*! ./ComponentView */ "./src/dom_components/view/ComponentView.js"); |
|
|
|
|
|
|
|
module.exports = ComponentView.extend({ |
|
|
|
module.exports = __webpack_require__(/*! ./ComponentView */ "./src/dom_components/view/ComponentView.js").extend({ |
|
|
|
events: {} |
|
|
|
}); |
|
|
|
|
|
|
|
@ -34387,7 +34427,7 @@ var ComponentView = __webpack_require__(/*! ./ComponentView */ "./src/dom_compon |
|
|
|
|
|
|
|
module.exports = ComponentView.extend({ |
|
|
|
events: { |
|
|
|
dblclick: 'enableEditing', |
|
|
|
dblclick: 'onActive', |
|
|
|
input: 'onInput' |
|
|
|
}, |
|
|
|
|
|
|
|
@ -34396,17 +34436,22 @@ module.exports = ComponentView.extend({ |
|
|
|
this.disableEditing = this.disableEditing.bind(this); |
|
|
|
var model = this.model; |
|
|
|
var em = this.em; |
|
|
|
this.listenTo(model, 'focus active', this.enableEditing); |
|
|
|
this.listenTo(model, 'change:content', this.updateContent); |
|
|
|
this.listenTo(model, 'focus', this.onActive); |
|
|
|
this.listenTo(model, 'change:content', this.updateContentText); |
|
|
|
this.rte = em && em.get('RichTextEditor'); |
|
|
|
}, |
|
|
|
updateContentText: function updateContentText(m, v) { |
|
|
|
var opts = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; |
|
|
|
|
|
|
|
!opts.fromDisable && this.disableEditing(); |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
* Enable element content editing |
|
|
|
* @private |
|
|
|
* */ |
|
|
|
enableEditing: function enableEditing(e) { |
|
|
|
onActive: function onActive(e) { |
|
|
|
// We place this before stopPropagation in case of nested
|
|
|
|
// text components will not block the editing (#1394)
|
|
|
|
if (this.rteEnabled || !this.model.get('editable')) { |
|
|
|
@ -34436,6 +34481,7 @@ module.exports = ComponentView.extend({ |
|
|
|
var model = this.model; |
|
|
|
var editable = model.get('editable'); |
|
|
|
var rte = this.rte; |
|
|
|
var contentOpt = { fromDisable: 1 }; |
|
|
|
|
|
|
|
if (rte && editable) { |
|
|
|
try { |
|
|
|
@ -34447,19 +34493,21 @@ module.exports = ComponentView.extend({ |
|
|
|
var content = this.getChildrenContainer().innerHTML; |
|
|
|
var comps = model.get('components'); |
|
|
|
comps.length && comps.reset(); |
|
|
|
model.set('content', ''); |
|
|
|
model.set('content', '', contentOpt); |
|
|
|
|
|
|
|
// If there is a custom RTE the content is just baked staticly
|
|
|
|
// inside 'content'
|
|
|
|
if (rte.customRte) { |
|
|
|
// Avoid double content by removing its children components
|
|
|
|
// and force to trigger change
|
|
|
|
model.set('content', content); |
|
|
|
model.set('content', content, contentOpt); |
|
|
|
} else { |
|
|
|
var clean = function clean(model) { |
|
|
|
var selectable = !model.is('text'); |
|
|
|
var selectable = !['text', 'default', ''].some(function (type) { |
|
|
|
return model.is(type); |
|
|
|
}); |
|
|
|
model.set({ |
|
|
|
editable: 0, |
|
|
|
editable: selectable && model.get('editable'), |
|
|
|
highlightable: 0, |
|
|
|
removable: 0, |
|
|
|
draggable: 0, |
|
|
|
@ -34474,7 +34522,7 @@ module.exports = ComponentView.extend({ |
|
|
|
}; |
|
|
|
|
|
|
|
// Avoid re-render on reset with silent option
|
|
|
|
model.trigger('change:content', model); |
|
|
|
model.trigger('change:content', model, '', contentOpt); |
|
|
|
comps.add(content); |
|
|
|
comps.each(function (model) { |
|
|
|
return clean(model); |
|
|
|
@ -34718,9 +34766,10 @@ module.exports = _backbone2.default.View.extend({ |
|
|
|
|
|
|
|
var model = this.model; |
|
|
|
var config = opt.config || {}; |
|
|
|
var em = config.em; |
|
|
|
this.opts = opt; |
|
|
|
this.config = config; |
|
|
|
this.em = config.em || ''; |
|
|
|
this.em = em || ''; |
|
|
|
this.pfx = config.stylePrefix || ''; |
|
|
|
this.ppfx = config.pStylePrefix || ''; |
|
|
|
this.attr = model.get('attributes'); |
|
|
|
@ -35060,9 +35109,17 @@ module.exports = _backbone2.default.View.extend({ |
|
|
|
this.renderAttributes(); |
|
|
|
this.renderChildren(); |
|
|
|
this.updateScript(); |
|
|
|
this.onRender(); |
|
|
|
this.postRender(); |
|
|
|
|
|
|
|
return this; |
|
|
|
}, |
|
|
|
postRender: function postRender() { |
|
|
|
var em = this.em, |
|
|
|
model = this.model; |
|
|
|
|
|
|
|
this.onRender(); |
|
|
|
em && em.trigger('component:mount', model); |
|
|
|
}, |
|
|
|
onRender: function onRender() {} |
|
|
|
}); |
|
|
|
|
|
|
|
@ -37158,6 +37215,8 @@ module.exports = function (config) { |
|
|
|
* ``` |
|
|
|
* |
|
|
|
* ### Components |
|
|
|
* * `component:create` - Component is created (only the model, is not yet mounted in the canvas) |
|
|
|
* * `component:mount` - Component is monted to an element and rendered in canvas |
|
|
|
* * `component:add` - Triggered when a new component is added to the editor, the model is passed as an argument to the callback |
|
|
|
* * `component:remove` - Triggered when a component is removed, the model is passed as an argument to the callback |
|
|
|
* * `component:clone` - Triggered when a new component is added by a clone command, the model is passed as an argument to the callback |
|
|
|
@ -37917,13 +37976,15 @@ module.exports = Backbone.Model.extend({ |
|
|
|
CssComposer = _attributes.CssComposer, |
|
|
|
UndoManager = _attributes.UndoManager, |
|
|
|
Panels = _attributes.Panels, |
|
|
|
Canvas = _attributes.Canvas; |
|
|
|
Canvas = _attributes.Canvas, |
|
|
|
Keymaps = _attributes.Keymaps; |
|
|
|
|
|
|
|
DomComponents.clear(); |
|
|
|
CssComposer.clear(); |
|
|
|
UndoManager.clear().removeAll(); |
|
|
|
Panels.getPanels().reset(); |
|
|
|
Canvas.getCanvasView().remove(); |
|
|
|
Keymaps.removeAll(); |
|
|
|
this.view.remove(); |
|
|
|
this.stopListening(); |
|
|
|
$(this.config.el).empty().attr(this.attrsOrig); |
|
|
|
@ -38095,7 +38156,7 @@ module.exports = function () { |
|
|
|
plugins: plugins, |
|
|
|
|
|
|
|
// Will be replaced on build
|
|
|
|
version: '0.14.42', |
|
|
|
version: '0.14.43', |
|
|
|
|
|
|
|
/** |
|
|
|
* Initialize the editor with passed options |
|
|
|
@ -38195,6 +38256,7 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument |
|
|
|
* * [get](#get) |
|
|
|
* * [getAll](#getAll) |
|
|
|
* * [remove](#remove) |
|
|
|
* * [removeAll](#removeall) |
|
|
|
* |
|
|
|
* @module Keymaps |
|
|
|
*/ |
|
|
|
@ -38369,6 +38431,20 @@ module.exports = function () { |
|
|
|
em && em.trigger('keymap:remove', keymap); |
|
|
|
return keymap; |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
* Remove all binded keymaps |
|
|
|
* @return {this} |
|
|
|
*/ |
|
|
|
removeAll: function removeAll() { |
|
|
|
var _this = this; |
|
|
|
|
|
|
|
Object.keys(keymaps).forEach(function (keymap) { |
|
|
|
return _this.remove(keymap); |
|
|
|
}); |
|
|
|
return this; |
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
|
@ -41395,7 +41471,7 @@ module.exports = function () { |
|
|
|
|
|
|
|
var hideToolbar = function hideToolbar() { |
|
|
|
var style = toolbar.style; |
|
|
|
var size = '-100px'; |
|
|
|
var size = '-1000px'; |
|
|
|
style.top = size; |
|
|
|
style.left = size; |
|
|
|
style.display = 'none'; |
|
|
|
@ -47154,6 +47230,7 @@ module.exports = _backbone2.default.View.extend({ |
|
|
|
var model = this.model; |
|
|
|
var value = model.getFullValue(); |
|
|
|
var target = this.getTarget(); |
|
|
|
var prop = model.get('property'); |
|
|
|
var onChange = this.onChange; |
|
|
|
|
|
|
|
// Avoid element update if the change comes from it
|
|
|
|
@ -47177,10 +47254,12 @@ module.exports = _backbone2.default.View.extend({ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (em) { |
|
|
|
em.trigger('component:update', target); |
|
|
|
em.trigger('component:styleUpdate', target); |
|
|
|
em.trigger('component:styleUpdate:' + model.get('property'), target); |
|
|
|
var component = em && em.getSelected(); |
|
|
|
|
|
|
|
if (em && component) { |
|
|
|
em.trigger('component:update', component); |
|
|
|
em.trigger('component:styleUpdate', component, prop); |
|
|
|
em.trigger('component:styleUpdate:' + prop, component); |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
|