Browse Source

Up

pull/5399/head
Artur Arseniev 3 years ago
parent
commit
c1ab34d021
  1. 4
      src/commands/view/CanvasClear.ts
  2. 2
      src/css_composer/model/CssRule.ts

4
src/commands/view/CanvasClear.ts

@ -2,7 +2,7 @@ import { CommandObject } from './CommandAbstract';
export default { export default {
run(ed) { run(ed) {
ed.DomComponents.clear(); ed.Components.clear();
ed.CssComposer.clear(); ed.Css.clear();
}, },
} as CommandObject; } as CommandObject;

2
src/css_composer/model/CssRule.ts

@ -268,7 +268,7 @@ export default class CssRule extends StyleableModel<CssRuleProperties> {
const sel = this.getSelectors() as any; const sel = this.getSelectors() as any;
const sngl = sel.length == 1 && sel.at(0); const sngl = sel.length == 1 && sel.at(0);
const cmpId = sngl && sngl.isId() && sngl.get('name'); const cmpId = sngl && sngl.isId() && sngl.get('name');
return (cmpId && this.em?.get('DomComponents').getById(cmpId)) || null; return (cmpId && this.em?.Components.getById(cmpId)) || null;
} }
/** /**

Loading…
Cancel
Save