|
|
|
@ -1,3 +1,4 @@ |
|
|
|
import CanvasModule from '..'; |
|
|
|
import DomainViews from '../../abstract/DomainViews'; |
|
|
|
import Frames from '../model/Frames'; |
|
|
|
import CanvasView from './CanvasView'; |
|
|
|
@ -5,11 +6,14 @@ import FrameWrapView from './FrameWrapView'; |
|
|
|
|
|
|
|
export default class FramesView extends DomainViews<Frames, FrameWrapView> { |
|
|
|
canvasView: CanvasView; |
|
|
|
private _module: CanvasModule; |
|
|
|
|
|
|
|
constructor(opts = {}, config: any) { |
|
|
|
super(opts, true); |
|
|
|
//console.log(this.collection)
|
|
|
|
this.listenTo(this.collection, 'reset', this.render); |
|
|
|
this.canvasView = config.canvasView |
|
|
|
this._module = config.module; |
|
|
|
} |
|
|
|
|
|
|
|
onRemoveBefore(items: FrameWrapView[], opts = {}) { |
|
|
|
@ -17,10 +21,8 @@ export default class FramesView extends DomainViews<Frames, FrameWrapView> { |
|
|
|
} |
|
|
|
|
|
|
|
onRender() { |
|
|
|
const { $el, em } = this; |
|
|
|
em && $el.attr({ class: `${em.config.stylePrefix}frames` }); |
|
|
|
const { $el, ppfx } = this; |
|
|
|
$el.attr({ class: `${ppfx}frames` }); |
|
|
|
} |
|
|
|
protected renderView(item: any, type: string){return new FrameWrapView(item, this.canvasView)} |
|
|
|
} |
|
|
|
|
|
|
|
//FramesView.prototype.itemView = FrameWrapView;
|
|
|
|
|