Browse Source

Update SwitchVisibility for multiple frames

pull/2524/head
Artur Arseniev 7 years ago
parent
commit
81b9787454
  1. 11
      src/commands/view/SwitchVisibility.js

11
src/commands/view/SwitchVisibility.js

@ -1,9 +1,16 @@
export default {
run(ed) {
ed.Canvas.getBody().className = this.ppfx + 'dashed';
this.toggleVis(ed);
},
stop(ed) {
ed.Canvas.getBody().className = '';
this.toggleVis(ed, 0);
},
toggleVis(ed, active = 1) {
const method = active ? 'add' : 'remove';
ed.Canvas.getFrames().forEach(frame => {
frame.view.getBody().classList[method](`${this.ppfx}dashed`);
});
}
};

Loading…
Cancel
Save