Loaded image files now appear on screen

This commit is contained in:
Igor Zinken
2020-12-10 23:20:37 +01:00
parent 02df19de7b
commit dcecf2fdc5
14 changed files with 199 additions and 65 deletions

View File

@@ -0,0 +1,25 @@
import Vue from 'vue';
import DocumentFactory from '@/factories/document-factory';
import LayerFactory from '@/factories/layer-factory';
import GraphicFactory from '@/factories/graphic-factory';
export default {
state: {
document: DocumentFactory.create(),
},
getters: {
document: state => state.document,
layers: state => state.document.layers,
},
mutations: {
addLayer( state ) {
state.document.layers.push( LayerFactory.create() );
},
addGraphicToLayer( state, { index, bitmap }) {
state.document.layers[ index ]?.graphics.push( GraphicFactory.create( bitmap ));
},
},
actions: {
}
}