Printing by coordinates?

Hi all.

There is an area to draw on her elements. Example:
5e1373e3002b7871171981.png

Svg.vue
<template>
<svg>
 <element :element="element" v-for="element in $store.state.elements" />
</svg>
</template>


Element.vue
<template>
<g>
 <rect x="element.x" :y="element.y" :width="element.w" :height="element.h" fill="#fff" stroke="#000" pointer-events="all"></rect>
</g>
</template>


In the $store.elements actually all different elements. Depending on their origin they are divided into blocks 500х400рх separated by a line.

How do you implement printing?
How to select the area to print only the 2nd block? That is, x: 500, y:0, w:500, h:400.
How to manage the status of items (for example to reduce the width, height of all elements by 50%)?

While I can only see doing a separate page. Then find the elements which fall on every unit, take them and draw. This is a direct but complex way the elements are very lot of conditions a lot.
April 4th 20 at 00:58
0 answer

Find more questions by tags JavaScriptVue.js