diff options
Diffstat (limited to 'electron/src/renderer/assets/js')
| -rw-r--r-- | electron/src/renderer/assets/js/simulator.js | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/electron/src/renderer/assets/js/simulator.js b/electron/src/renderer/assets/js/simulator.js index fa963bbe..0e60e1c2 100644 --- a/electron/src/renderer/assets/js/simulator.js +++ b/electron/src/renderer/assets/js/simulator.js @@ -508,6 +508,18 @@ export default { prevStitch = stitch }) }) + }, + generatePage () { + this.$refs.simulator.style.backgroundColor = this.page_specs.deskcolor + this.svg.rect(this.page_specs.width, this.page_specs.height) + .move(-this.stitchPlan.bounding_box[0],-this.stitchPlan.bounding_box[1]) + .fill(this.page_specs.pagecolor) + .stroke({width: 1, color: 'black'}) + .filterWith(add => { + let blur = add.offset(2,2).in(add.$sourceAlpha).gaussianBlur(2) + add.blend(add.$source, blur) + }) + .back() } }, created: function () { @@ -530,6 +542,7 @@ export default { this.jumpMarks = {} this.needlePenetrationPoints = [] this.cursor = null + this.page_specs = {} }, mounted: function () { this.svg = SVG().addTo(this.$refs.simulator).size('100%', '100%').panZoom({zoomMin: 0.1}) @@ -581,7 +594,7 @@ export default { this.generateColorSections() this.generateScale() this.generateCursor() - + this.loading = false // v-on:keydown doesn't seem to work, maybe an Electron issue? @@ -600,5 +613,9 @@ export default { this.start() }) + inkStitch.get('page_specs').then(response => { + this.page_specs = response.data + this.generatePage() + }) } } |
