Skip to content

Commit

Permalink
Bump v0.14.20
Browse files Browse the repository at this point in the history
  • Loading branch information
artf committed Jun 10, 2018
1 parent a7b457c commit a950f95
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 8 deletions.
23 changes: 17 additions & 6 deletions dist/grapes.js
Original file line number Diff line number Diff line change
Expand Up @@ -5016,7 +5016,7 @@ var Component = Backbone.Model.extend(_Styleable2.default).extend({
var defaults = this.defaults;

(0, _underscore.forEach)(defaults, function (value, key) {
if (key !== 'type' && obj[key] === value) {
if (['type', 'content'].indexOf(key) === -1 && obj[key] === value) {
delete obj[key];
}
});
Expand Down Expand Up @@ -24515,6 +24515,7 @@ module.exports = _backbone2.default.View.extend({
},
removeChildren: function removeChildren(removed) {
var view = removed.view;
if (!view) return;
view.remove.apply(view);
var children = view.childrenView;
children && children.stopListening();
Expand Down Expand Up @@ -24793,6 +24794,7 @@ module.exports = ComponentView.extend({
toggleEvents: function toggleEvents(enable) {
var method = enable ? 'on' : 'off';
var mixins = { on: _mixins.on, off: _mixins.off };
this.em.setEditing(enable);

// The ownerDocument is from the frame
var elDocs = [this.el.ownerDocument, document];
Expand Down Expand Up @@ -26611,6 +26613,7 @@ var $ = Backbone.$;
module.exports = Backbone.Model.extend({
defaults: function defaults() {
return {
editing: 0,
selected: new Collection(),
clipboard: null,
designerMode: false,
Expand Down Expand Up @@ -27259,6 +27262,13 @@ module.exports = Backbone.Model.extend({
this.stopListening();
$(this.config.el).empty().attr(this.attrsOrig);
},
setEditing: function setEditing(value) {
this.set('editing', value);
return this;
},
isEditing: function isEditing() {
return !!this.get('editing');
},


/**
Expand Down Expand Up @@ -42578,7 +42588,7 @@ module.exports = _backbone2.default.View.extend({
body.removeChild(dummy);
this.propTarget = target;
var coll = this.collection;
var events = 'component:selected component:update:classes component:update:state change:device';
var events = 'component:toggled component:update:classes component:update:state change:device';
this.listenTo(coll, 'add', this.addTo);
this.listenTo(coll, 'reset', this.render);
this.listenTo(this.target, events, this.targetUpdated);
Expand Down Expand Up @@ -46694,6 +46704,7 @@ module.exports = __webpack_require__(0).View.extend({
},
removeChildren: function removeChildren(removed) {
var view = removed.viewLayer;
if (!view) return;
view.remove.apply(view);
},

Expand Down Expand Up @@ -49799,7 +49810,7 @@ module.exports = {

module.exports = {
run: function run(ed) {
if (!ed.Canvas.hasFocus()) return;
if (!ed.Canvas.hasFocus() || ed.getModel().isEditing()) return;
var toSelect = [];

ed.getSelectedAll().forEach(function (component) {
Expand All @@ -49822,7 +49833,7 @@ module.exports = {

module.exports = {
run: function run(ed) {
if (!ed.Canvas.hasFocus()) return;
if (!ed.Canvas.hasFocus() || ed.getModel().isEditing()) return;
var toSelect = [];

ed.getSelectedAll().forEach(function (component) {
Expand All @@ -49845,7 +49856,7 @@ module.exports = {

module.exports = {
run: function run(ed) {
if (!ed.Canvas.hasFocus()) return;
if (!ed.Canvas.hasFocus() || ed.getModel().isEditing()) return;
var toSelect = [];

ed.getSelectedAll().forEach(function (component) {
Expand All @@ -49867,7 +49878,7 @@ module.exports = {

module.exports = {
run: function run(ed) {
if (!ed.Canvas.hasFocus()) return;
if (!ed.Canvas.hasFocus() || ed.getModel().isEditing()) return;
var toSelect = [];

ed.getSelectedAll().forEach(function (component) {
Expand Down
4 changes: 2 additions & 2 deletions dist/grapes.min.js

Large diffs are not rendered by default.

0 comments on commit a950f95

Please sign in to comment.