mirror of https://github.com/artf/grapesjs.git
6 changed files with 41 additions and 49 deletions
@ -1,7 +1,20 @@ |
|||
import { Model } from 'backbone'; |
|||
import Frames from 'canvas/model/Frames'; |
|||
|
|||
export default Model.extend({ |
|||
defaults: () => ({ |
|||
frames: [] |
|||
}) |
|||
}), |
|||
|
|||
initialize(props = {}) { |
|||
this.set('frames', new Frames(this.get('frames'))); |
|||
}, |
|||
|
|||
getFrames() { |
|||
return this.get('frames'); |
|||
}, |
|||
|
|||
getMainFrame() { |
|||
return this.getFrames().at(0); |
|||
} |
|||
}); |
|||
|
|||
Loading…
Reference in new issue