diff --git a/src/webapp/src/components/seatplan/editor/properties.vue b/src/webapp/src/components/seatplan/editor/properties.vue index 822a948..3bad54e 100644 --- a/src/webapp/src/components/seatplan/editor/properties.vue +++ b/src/webapp/src/components/seatplan/editor/properties.vue @@ -10,33 +10,51 @@ @@ -44,38 +62,44 @@ export default { name: 'propertiesSeatplan', props: { - posSize: { + draggables: { type: Object, - "default": { 'x': 100, 'y': 100, 'w': 200, 'h': 100, 'origin': 1 } + "default": {} }, scaleFactor: { type: Number, "default": 1, }, + active: { + type: Number, + "default": 1, + }, }, data () { return { - isEditing: { 'w':false }, - internal: { 'x': 100, 'y': 100, 'w': 200, 'h': 100 }, + internal: {}, } }, methods: { - activateEditing ( option ) { - this.isEditing[ option ] = true; - for ( let value in this.posSize ) { - this.internal[ value ] = this.posSize[ value ]; + loadInternal () { + for ( let value in this.draggables ) { + this.internal[ value ] = this.draggables[ value ]; } }, - resubmit ( option ) { - console.log( 'ok' ); - this.isEditing[ option ] = false; - this.$emit( 'updated', this.internal ) + resubmit () { + this.$emit( 'updated', this.internal ); } }, watch: { - posSize() { - console.log( 'posSize changed' ); + draggables ( value ) { + this.loadInternal(); + }, + active ( value ) { + this.loadInternal(); } + }, + created () { + this.loadInternal(); } } diff --git a/src/webapp/src/components/seatplan/editor/window.vue b/src/webapp/src/components/seatplan/editor/window.vue index 7364133..a469a42 100644 --- a/src/webapp/src/components/seatplan/editor/window.vue +++ b/src/webapp/src/components/seatplan/editor/window.vue @@ -9,13 +9,15 @@