Browse Source

Make the sync work with only active selectors

pull/2474/head
Artur Arseniev 7 years ago
parent
commit
caedef751c
  1. 6
      src/selector_manager/model/Selectors.js
  2. 2
      src/selector_manager/view/ClassTagsView.js

6
src/selector_manager/model/Selectors.js

@ -14,8 +14,10 @@ export default Backbone.Collection.extend({
); );
}, },
getValid() { getValid({ noDisabled } = {}) {
return filter(this.models, item => !item.get('private')); return filter(this.models, item => !item.get('private')).filter(item =>
noDisabled ? item.get('active') : 1
);
}, },
getFullString(collection) { getFullString(collection) {

2
src/selector_manager/view/ClassTagsView.js

@ -78,7 +78,7 @@ export default Backbone.View.extend({
const { em } = this; const { em } = this;
const target = this.getTarget(); const target = this.getTarget();
const cssC = em.get('CssComposer'); const cssC = em.get('CssComposer');
const selectors = target.getSelectors().getValid(); const selectors = target.getSelectors().getValid({ noDisabled: 1 });
const state = target.get('state'); const state = target.get('state');
const mediaText = em.getCurrentMedia(); const mediaText = em.getCurrentMedia();
const ruleComponent = cssC.getIdRule(target.getId(), { state, mediaText }); const ruleComponent = cssC.getIdRule(target.getId(), { state, mediaText });

Loading…
Cancel
Save