|
|
@ -16,11 +16,9 @@ export default { |
|
|
toggleVis(ed, active = 1) { |
|
|
toggleVis(ed, active = 1) { |
|
|
if (!ed.Commands.isActive('preview')) { |
|
|
if (!ed.Commands.isActive('preview')) { |
|
|
const cv = ed.Canvas; |
|
|
const cv = ed.Canvas; |
|
|
|
|
|
const mth = active ? 'on' : 'off'; |
|
|
cv.getFrames().forEach(frame => this._upFrame(frame, active)); |
|
|
cv.getFrames().forEach(frame => this._upFrame(frame, active)); |
|
|
cv.getModel()[active ? 'on' : 'off']( |
|
|
cv.getModel()[mth]('change:frames', this._onFramesChange); |
|
|
'change:frames', |
|
|
|
|
|
this._onFramesChange |
|
|
|
|
|
); |
|
|
|
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|