mirror of https://github.com/artf/grapesjs.git
1 changed files with 9 additions and 2 deletions
@ -1,9 +1,16 @@ |
|||||
export default { |
export default { |
||||
run(ed) { |
run(ed) { |
||||
ed.Canvas.getBody().className = this.ppfx + 'dashed'; |
this.toggleVis(ed); |
||||
}, |
}, |
||||
|
|
||||
stop(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…
Reference in new issue